A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
this week in the
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.
It is sorta covered in the
JavaRanch Style Guide
subject: Positioning controls on a GridBagLayout
Problems positioning buttons in GridBagLayout
How can i open a paenl thru ActionPerformed
Problem in JDialogBox
GridLayout with weightx
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014