View Full Version : how to dynamically change the position of a panel from west to north

21 Dec 2010, 5:20 AM

which is the correct way to change the position of a panel inside a borderlayout?

Bye, Dumbledore

21 Dec 2010, 5:38 AM
Why is it a problem?

Remove it from the layout: 'fit' west Container, and add it to the (empty) layout:'fit' north Container.

21 Dec 2010, 5:40 AM
the problem is, that i have not a north container on rendering. Must i do a hidden container?

21 Dec 2010, 5:50 AM
Yes if you are sure you need a border layout. As its API docs state, the regions are fixed at render time.

Maybe it would be better using a top level vbox layout.

The top one would be your "north" (though there are no regions in box layouts)

Then below would be a central Container which would be layout: 'border' with a west and center (Only needs to be border if you are using the splitbar to drag - otherwise it could be an hbox layout)

21 Dec 2010, 5:54 AM
Thanks for your answer. In my case both regions should be resizable via splitbar so i must use a borderlayout...