{@code GridLayout} has a number of configurable fields, and the control itlays out can have an associated layout data object, called {@link GridLayoutData}.
The following code lays out six buttons into three columns and two rows:
LayoutPanel layoutPanel = new LayoutPanel(new GridLayout(3, 2)); layoutPanel.add(new Button("1")); layoutPanel.add(new Button("2")); layoutPanel.add(new Button("3")); layoutPanel.add(new Button("4")); layoutPanel.add(new Button("5")); layoutPanel.add(new Button("6"));
The {@code columns} and {@code rows} parameters are the most important{@code GridLayout} properties. Widgets are laid out in columns from left toright, and rows from top to bottom. @see GridLayoutData @author georgopoulos.georgios(at)gmail.com
|
|
|
|
|
|