You can modify the appearance of a container on your form by setting general properties for the layout manager and properties specific to the layout of each component in the container (constraints).
To set general layout manager properties:
The layout properties are displayed in the Properties window. General layout properties enable you to modify the layout manager's overall settings, such as alignment of components managed by the layout manager and the horizontal and vertical gap between the components. The properties vary depending on the layout manager. Some layout managers do not have any properties.
To set layout properties of components:
The component's layout properties are displayed in the Properties window. These are the layout properties specific to the layout of each component managed by a layout manager. (These properties are also called "constraints.") For example, when BorderLayout is used, the Direction property is set according to which of the five parts of the form the component resides in (North, South, West, East, or Center).
With some layout managers (BorderLayout, AbsoluteLayout, and Null Layout) you can also change constraints by dragging components in the Form Editor.
![]() |
Not all layout managers use constraints. These layout managers (FlowLayout, GridLayout, and BoxLayout), do not have any Layout properties and component layout is determined by component order. |
See Also | |
---|---|
Setting the Layout Manager
Reordering Components Within a Container |