Sun Java Studio Creator 2 – Online Help
 

Setting the Grid

See Also | Tutorials

When you create components in the Visual Designer, they are positioned on top of a grid. You can determine the size of the grid and whether components move, or snap, to the nearest part of the grid when dropped in the Visual Designer. The following example shows a button snapped to a visible grid.

Image of a button lined up with the right and top lines of the grid

The following example shows a button that is not snapped to the grid.

Image of a button not lined up with the grid

To set up the grid:

  1. From the main menu, choose Tools > Options.
     
  2. Scroll down and select the Visual Designer node.
     
  3. In the Properties node on the right side, set the Show Grid, Snap to Grid, Grid Height, and Grid Width properties.
     
  4. Click Close.
    • Note: To temporarily turn off the grid while working with components, hold down the Shift key.

     
To snap an item to the grid:
  1. In the Visual Designer, select the item.
     
  2. Right-click and choose Align > Snap To Grid.
     
See Also
Selecting Components in a Page
Adding Components to a Page
Aligning Components
Component Tasks: Quick Reference
Options: Visual Designer
Tutorials
Delving Into Components Tutorial
 
 
 
Legal Notices. Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Close