When GUI builder starts, a separate layout window opens with a default panel container. The layout window displays a gridbag layout. GUI builder uses a grid system that enables you to place GUI components, such as buttons and text fields, in the cells of a grid. You can nest grids within the cells of other grids using the Gridbag Layout Panel component.
At any time during the layout process, you can view a close approximation of how the layout will look in your application by switching the GUI builder mode from Edit to Preview.
Delete empty rows and columns from the grid by selecting them and pressing the Delete key. The row and column containing the selected cell will be deleted (you cannot delete individual cells). To delete a row or column that contains a component, you must first delete the component.
To add components to the layout
grid:
To add an invisible bean
to the layout grid:
Because the bean has no visible representation, it cannot be viewed in the layout. To verify that you have added the invisible bean, check the Windows list to the right of the palette. Each time an invisible bean is selected, it's name is added to the Windows choice list. The attribute editor for the invisible bean should also appear each time the bean is selected.
To add a component to more than one cell:
Once you have placed a component in a cell, you can adjust its size and location in the grid. To resize a component, see Resizing a Component. To set the resizing behavior of individual components with respect to the resizing of the window that contains them, see Resizing the Layout. To stretch components across cells, delete components, or change their attributes, see Modifying Components in a Grid.
To see examples of how to design a layout, see:
See GUI Builder Palette for information about components in the GUI builder palette.
See also: