Каковы параметры для GridLayout?

private static final GridLayout layout = new GridLayout( 3, 1, 1, 0 );

в этой строке кода, что представляют собой цифры и как вы используете их для размещения флажков и кнопок в окне?

11.12.2008 21:00:18
2 ОТВЕТА
6
11.12.2008 21:20:56

Класс GridLayout :

public GridLayout(int rows,
                  int cols,
                  int hgap,
                  int vgap)

Creates a grid layout with the specified number of rows and columns. All components in the layout are given equal size.
In addition, the horizontal and vertical gaps are set to the specified values. Horizontal gaps are placed between each of the columns. Vertical gaps are placed between each of the rows.

One, but not both, of rows and cols can be zero, which means that any number of objects can be placed in a row or in a column.

All GridLayout constructors defer to this one.

Parameters:
rows - the rows, with the value zero meaning any number of rows
cols - the columns, with the value zero meaning any number of columns
hgap - the horizontal gap
vgap - the vertical gap
9
12.12.2008 00:57:36