This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Here's a panel called panelLower from my GUI. It sits in the the SOUTH BorderLayout position in a JPanel, which is displayed in a frame.
It has a 2x2 GridBagLayout with 2 panels, panelControls and panelPositions, plus a checkbox.
The 2 panels each have GridBagLayouts, of 4x1 and 8x1. panelControls contains 4 panels (Zoom, Move, Detail, Size) which are configured with GroupLayouts or GridBagLayouts.
My problem is this: when I resize the frame, the left-most columns of the GridBagLayouts are squashed. Here's what I mean:
The Zoom panel has shrunk and the first label on panelPositions has disappeared altogether. What I want if for the panels to stay rigid and not shrink at all. Is this possible with the GridBagLayout?
I have set a minimumSize and a preferredSize for each of the panels. Not sure what else I can do.
If I set the look and feel to the default Metal and include this line, it does respect the minumum sizes. However it makes the frame take the Metal look, as well as the whole GUI, so it's not really a solution. The line doesn't have any effect with Nimbus either either (frame is as per System look and feel).