Aligning Components
See Also
Once you have added components, you can adjust their alignment
them to ensure that your form will appear as desired at runtime.
To align components:
- Select the components you want to align in the GUI Builder's workspace.
- Click the appropriate align button in the GUI Builder toolbar. Alternately, you
can right-click either component and choose Align > Left in Column
(or Align > Right in Column) from the pop-up menu.
The IDE shifts the component positions such that the specified edges are aligned
and the component anchoring relationships are updated.
To align component baselines:
- Select the component you want to align in the GUI Builder's workspace.
- Drag the component to the right or left of the component you want to align it with.
- When the horizontal guideline appears indicating that the first component's baseline is aligned with
the baseline of the second component and the spacing between the two components is
suggested with a vertical guideline, click to position the component.
The IDE snaps the second component into a position aligned with the baseline of the first.
Status lines are displayed indicating the component spacing and
anchoring relationships.
To indent components:
- Select the component you want to indent in the GUI Builder workspace.
- Select the component below the component below which you want to indent it.
- When guidelines appear indicating that the first component's left edge is
aligned with that of the JLabel, move it further to the right until secondary
indentation guidelines appear.
- Click to position the component.
The IDE indents the second component below the first component.
- See Also
- Sizing Components
- Editing Component Properties
- Selecting Components in a Form
Legal Notices