A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
Positioning controls on a GridBagLayout
Joined: Jun 05, 2001
Jan 03, 2006 13:18:00
I have a GridbagLayout which has a
on the left and 2 JComboBoxes
on the right. How can I set the contraints so if the panel is stretched
the 2 combo boxes remain on the right of the panel?
Joined: Jan 21, 2003
Jan 03, 2006 16:03:00
You should create your constraints so the right hand has a higher weight. For example.
constraint = new GridBagConstrait(1,1, 1,1,
If you post some code I'll be glad to help you out.
I agree. Here's the link:
subject: Positioning controls on a GridBagLayout
GridLayout with weightx
Problems positioning buttons in GridBagLayout
Problem in JDialogBox
How can i open a paenl thru ActionPerformed
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014