> How do I set the size of one "cell" in a GridLayout?
To "set the size on a singular cell" is rather another paradigm on how
layouts are made, than the underlying premises on how the LayoutManagers
The use of exact pixel sizes was more or less abandoned for the use of
relative sizes. This is to some degree based on the premise that you would
probably prefer the look of the layout to adapt more to the actual
To make a long story short:
Say for example that you define a panel with a GridLayout(3, 2).
If the size of the panel is height 60 and width 30, then *each* cell will be
height 20 an width 15.
If you change the size of the panel to height 30 and width 60, the size of
*each* cell will be height 10 and width 30.
As you see the sizes of the individual cells are set "relatively" to the
size of the container.
// Bjorn A
Questions of this kind should only be posted to comp.lang.java.gui.
No sense in posting it to comp.lang.java.programmer.