| gridx |
column number. First column is column 0. It is ok to skip columns to leave
room to add stuff later. They won’t take up space. |
| gridy |
row number. Top row is row 0. It is ok to skip rows. |
| gridwidth |
How many cells wide the Component is. May not be
0. This is not the number of pixels, but rather the number of cells. It
can look as though nothing is happening if you increase the gridwidth for all
the cells in a column since the extra column is zero-width. Rows must have
different gridwidths in some cell for you to notice any difference between rows
in cell size. |
| gridheight |
How many cells tall the Component is. May not be
0. |
| weightx |
What percentage of the extra width in the container should this Component
take for its growth? Percentages don’t have to add up to 100. GridBagLayout
normalises them for you, I have heard some talk what it does is actually more
complicated. Note these are not the percentages for width, but the percentages
for sharing the pie of any excess width left over after every column gets its
minimum. Only cells using FILL will partake of the growth. |
| weightx |
What percentage of the extra height in the container should this Component
take for its growth? Percentages don’t have to add up to 100. |
| anchor |
Where you want your Component to rest in its
containing box. By default it is GridBagConstraints. CENTER.
possibilities are: CENTER, NORTH,
NORTHEAST, EAST, SOUTHEAST,
SOUTH, SOUTHWEST, WEST,
and NORTHWEST. |
| fill |
GridBagConstraints.NONE
= don’t grow the Component even if its allotted
space is bigger than he Component. VERTICAL=grow
the Component vertically to take up extra height. HORIZONTAL=grow
the Component horizontally to take up extra width. BOTH=grow
both vertically and horizontally. |
| ipadx |
How much wider you want your Component to be than
it would be normally. Measured in pixels. |
| ipady |
How much taller you want your Component to be
than it would be normally. Measured in pixels. |
| insets |
new Insets
( 0
, 0
, 0
, 0
) The minimum amount of white space you demand
around your Component. Measured in pixels. |