Reordering Components Within a Container

The order of components in a container is the order in which components are added and the order in which they are selected when you press the Tab key.

If the layout manager for a container does not use constraints (properties that determine layout), the order of components determines how the components are arranged. Such layout managers include FlowLayout, BoxLayout, and GridLayout. With these layout managers, you can change the order of components by dragging them in the Form Deisigner or by reordering them in the Component Inspector.

With layout managers that use constraints (BorderLayout, GridBagLayout, CardLayout, AbsoluteLayout, and Null Layout), the order of components in the container does not determine the order in which the components appear. For these containers, you can only rearrange the component order in the Component Inspector.

To reorder the components in the Component Inspector:

Tip Although GridBagLayout uses constraints to determine how components are arranged, component order determines layout when the Grid X and Grid Y constraints are not used.
See also
Component Inspector
Moving or Copying a Component
Setting Layout Properties
GridBagLayout

Legal Notices