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:

  1. Select the components you want to align in the GUI Builder's workspace.
  2. 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:

  1. Select the component you want to align in the GUI Builder's workspace.
  2. Drag the component to the right or left of the component you want to align it with.
  3. 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:

  1. Select the component you want to indent in the GUI Builder workspace.
  2. Select the component below the component below which you want to indent it.
  3. 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.
  4. Click to position the component.
  5. The IDE indents the second component below the first component.

See Also
Sizing Components
Editing Component Properties
Selecting Components in a Form

Legal Notices