If i want two label to be positioned as in a panel that's next to it and i want label1 to be at position gridx = 0; gridy = 0; and label2 to be in position gridx = 0; gridy = 3; how do i fill up gridy 1 and gridy 2? Thanks alot!!
Ling, If you have additional rows with components in those columns, you wouldn't have to do anything special. If however, there isn't anything else in other rows that will create the space you want, you'll need to use some sort of invisible component. javax.swing.Box.createGlue() is most likely what you'll want. You treat it like any other component except that it won't actually show up. It just takes up space. Coupled with GridBagConstraints, it can get your panel looking how you want it.