Specifying grid display preferences for containers

When working with Swing GridBagLayout, SWT GridLayout, or null layout, you can specify a preference to show or hide the grid feedback in the Design view.

By default, the grid feedback for these layout managers is displayed whenever the container or a child component is selected. However, you can choose to not display the grid feedback.

Note:
  • When you are dropping or moving components within Swing GridBagLayout, the grid markers and the column and row numbers are always displayed.
  • When you are dropping or moving components within SWT GridLayout, the grid markers are always displayed.

You can specify the grid display preferences on the Visual Editor preferences page:

  1. From the main menu, click Window > Preferences to open the Preferences window.
  2. Expand Java and select Visual Editor.
  3. Select Show grid when container or its children are selected. By default, this check box is selected. If you clear this check box, the grid feedback will not display, even when the container or a child component is selected.
  4. Optional: For null layout, in the X/Y grid spacing field, enter a value in pixels to specify the distance between the grid dots.
    Note: You can override this universal preference in individual containers that use null layout by specifying custom X and Y distances using the Customize Layout Customize Layout toolbar button window.
Related tasks
Using GridBagLayout (AWT)
Using GridLayout (SWT)
Using null layout

(C) Copyright IBM Corporation 1999, 2004. All Rights Reserved.