All,
I'm trying to set up a panel such that it has a few subcomponents, two of which are GridBagLayout due to the necessity of having irregularly sized columns.
The screen looks something like this:
----------
|Panel1 |
|--------|
| |
|Panel2 |
| |
|--------|
|Panel3 |
|--------|
| |
|Panel4 |
| |
|--------|
|Panel5 |
----------
/
Now Panel2 is a GridBagLayout, as is Panel4.
Panel4 however starts out empty and gets filled later on in response to certain events. It's bound to a scrollPane.
What happens though is that initially Panel2 and Panel4 start out about the same height, trying to equalize vertical sizes I guess. I don't mind Panel4 filling up extra space, in fact, that's desireable, but Panel2 is to have fixed fields on it, so I would prefer if it were to take up only as much height as it needed.
So is there any method whereby I can make Panel2 only take up as much vertical space as it needs, and have Panel4 behave as it is currently (taking up whatever is left over)? I also need Panels 1, 3, and 5 to be unaffected by this size-wise.
Thanks in advance.