Java Reference
In-Depth Information
An empty area of the design window
An empty container
A container with no assigned layout
An empty cell in a container with layout
When you're placing container elements such as a JP anel, you can hold
down the mouse button and drag the container out to the desired size,
placing and sizing in a single step. You'll learn more about sizing later in
the chapter.
TIP
Selecting components
To select a component, click it in the design view. For a
container such as a JP anel, click anywhere inside the
container. Once selected, the container or component is
outlined in a series of resizing handles, as shown in fig-
ure 10.2. A small drag icon appears next to the selected
element, providing a more convenient handle for mov-
ing the item. Clicking another component or clicking an
empty area of the design view cancels your selection.
You can also select an item by clicking its name in the component tree. Some-
times this can be more convenient if an interface is crowded with components. If a
container is completely filled by components, this is the only way to select the
container itself.
To select multiple components at once, hold down the Ctrl key while you select.
To select a group of items, hold down the Shift key while dragging a selection box
around them; all components completely within the selection box are selected.
Figure 10.2 Selecting a
component surrounds it in
blue resizing handles.
You can use the grow/shrink shortcuts from the text editor ( Ctrl+W and
Ctrl+Shift+W ) to progressively expand and reduce the selection of
components within a container.
TIP
Positioning components
To move a component, click anywhere in it and then, while keeping the mouse
button down, move the component to its new location. The pointer changes to an
icon to indicate valid landing sites. You can abort a move in progress by pressing
the Esc key.
 
 
 
 
Search WWH ::




Custom Search