actually its really easy, in gui builder make a "container" not a "form".. 
then you can just get it and put it inside a container in another screen, 
some example code 

 Container ContainerNORTHinset = 
(Container)findByName("ContainerNORTHinset",f);//the place (on your current 
form) where you want to add your reusable container
        ContainerNORTHinset.removeAll();//make sure its empty
        Container IncludeStudentLifeHeaderSelectTerm  =  
(Container)createContainer(r, "IncludeStudentLifeHeaderSelectTerm"); //HERE 
you instance your container
        
ContainerNORTHinset.add(BorderLayout.CENTER,IncludeStudentLifeHeaderSelectTerm);//add
 
it to the form

viola, u may also sometimes need

 f.revalidate();

On Friday, May 15, 2020 at 11:19:08 PM UTC+8, Jaanus Kiipli wrote:
>
> Sorry for stupid question, but how to do that? is there a way to embed 
> container using the GUIBuilder or should I fiddle in the xml files manually 
> or in the java code or how?
>
> On Tuesday, October 22, 2013 at 10:05:47 PM UTC+3, Rikard Lindgren wrote:
>>
>> Not sure if this is what you are looking for, but you can use the Embed 
>> Container to achieve something similar to what you are asking for.
>> The Embed Container let´s you embed another GUI Element. So in your case 
>> i would create the Header and Footer as separate GUI elements and then use 
>> the Embed Container to add them to each page.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/730be7ea-c4f5-484f-bc98-0af66cb3f2cf%40googlegroups.com.

Reply via email to