Link to home
Start Free TrialLog in
Avatar of abcast
abcast

asked on

swing layouts & resizing

I have a JDialog.  The layout used by this JDialog is SpringLayout.  I have two JPanels within this JDialog.  I would like both of these panels to resize when I resize the JDialog.  How can I do this?
ASKER CERTIFIED SOLUTION
Avatar of ADSLMark
ADSLMark

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of abcast
abcast

ASKER

Actually, I've adjusted my layout selection a bit.  I now have a GridBagLayout with a bunch of components, and then at the bottom I have a JPanel w/ some buttons.  When I resize horizontally, everything seems to respond as I want it to.  However, when I resize vertically, nothing that I want to resize actually resizes.  I have the fill set to BOTH on the constraints, though...
SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of abcast

ASKER

How can I do this with a GridBagLayout though? I know there must be some way.  I want the JLabels to stay the same size, but the JTextFields to increase their vertical size as the user resizes the form.
use a BorderLayout for that
Avatar of abcast

ASKER

Well, I would like to use a GridBagLayout because I want to control the vertical and horizontal spacing between some of the components.
can't help you sorry, i never use it. find it far too cryptic and never found a layout that couldn't be done with other managers.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial