PDA

View Full Version : Feature Request: width & height on center panel



cwolves
7 Jun 2007, 1:39 PM
If it's not too difficult to implement, could width & height be followed when applicable on a center panel of a border layout when it's not set on one of the neighboring panels? I have an admin section where I put 3 panels next to eachother horizontally. I wanted the far right one to take up whatever the other two weren't and couldn't do it. I ended up doing:


+------+--------------------+
| |+------+-----------+|
| || | ||
| || | ||
| || | ||
| || | ||
| || | ||
| || | ||
| || | ||
| || | ||
| |+------+-----------+|
+------+--------------------+

where the two left panels were set to specific default widths.

jack.slocum
7 Jun 2007, 10:18 PM
That's not how BorderLayout works. In a BorderLayout, the center is the "fill" and always expands and shrinks. You could hack the code to adust this behavior, but I wouldn't recommend it. There is a lot of code that depends on the behavior.

However, you could acheive something similar using nested layouts.