You can specify a layout manager for a container to help you manage
the layout and organization of the visual components within that container.
Your Java class must contain a container, such as JFrame, JPanel,
or Shell, that allows for a layout manager to be set.
When you add a container to a Java class in the visual editor, it
is given a default layout manager or is set to null. For example, the default
layout manager in the visual editor for JPanel is FlowLayout. You can change
the layout by changing the layout property in the Properties view.
- In the Design view or Java Beans view, select the container that
you want to specify a layout manager for.
- In the Properties view, locate the layout property, and click its
value column.
- Select the layout manager that you want
to use for the container.