Java Reference
In-Depth Information
Modifying your layout
Once you've placed components inside a container by using one of the grid lay-
outs, their size and positioning are controlled by the container's layout manager.
The ongoing development of a form may require adjustment to the number of
rows and columns that made up the grid, so special container controls appear in
the Form Workspace (see table 10.1).
There are two basic approaches to modifying a UI in the GUI Designer:
NOTE
Breaking the grid, modifying components (adding, removing,
moving), and joining them back into a grid
Adding and removing columns and rows (without breaking
the grid)
Arrange the components you wish to include in your interface into position.
Select the components you wish to lay out together, and click one of the layout
icons in the GUI Designer's toolbar to apply the layout. The selected components
are added to a new JP anel container, and the selected layout is applied. If you've
selected a grid layout, the designer attempts to apply appropriate layout con-
straints in order to approximate the initial arrangement of the components. For
Table 10.1
Special container controls used to fine-tune the configuration of your GUI containers
Icon
Control
Description
Drag handle
Indicates that the selected component can be moved; click and drag the
handle or the component to do so
Row/Column menu
Allows access to a menu of controls for row/column manipulation
Insert column to left
Creates a new column, inserted to the left of the current column
Insert column to right
Creates a new column, inserted to the right of the current column
Split column
Splits the current column in two; any components in that column expand
to span both new columns
Insert row above
Creates a new row above the current row
Insert row below
Creates a new row below the current row
Split row
Splits the current row in two; any components in that row expand to span
both new rows
Delete row/column
Deletes an empty row/column from the layout
 
 
 
Search WWH ::




Custom Search