Using the GridBag Customizer

See Also

The GridBag customizer enables you to visually adjust the placement and constraints of components in a GridBagLayout. It includes a property sheet for GridBag constraints, buttons for adjusting the constraints, and a rough depiction of the layout of the components. The GUI Builder more closely reflects how the components will look at runtime.

To use the GridBag customizer:

  1. Add the components you require to your form and ensure the GridBagLayout is set for it.
  2. To open the customizer, right-click the GridBagLayout node in the Inspector window and choose Customize from the contextual menu.
  3. Drag the components in the right pane to reposition them as desired. As you drag a component, its Grid X and Grid Y properties change to reflect its new position.
  4. Once the approximate layout of the components has been established, select a component and adjust its constraints as desired in the left pane. Note that you can either enter the values directly or use the provided buttons to adjust the component's constraints.
  5. Once you are satisfied with the layout, click Close to exit the customizer.

    The IDE updates the edited components to reflect there new positions.

You can adjust the following constraints:

See Also
About Layout Managers
Setting the Layout Manager
Setting Layout Properties

Legal Notices