Java Reference
In-Depth Information
Figure 10.6 Changing the column span and the row span of components makes them take up
more or less room on the grid. Notice the smaller combo boxes in this image (column span of 1
instead of 2).
10.4.3
Using spacers to control layout
On the Component palette, you'll find the horizontal and vertical spacer compo-
nents (they look like springs). These are used to control spacing within your user
interface. When placed in your layout, they grow to take up all the space remain-
ing in their appropriate direction after you've sized the other components. If you
insert more than one spacer in a given direction, they divide the remaining space
equally among themselves. So, a horizontal spacer on both sides of a group of
components forces the components to be centered.
Figure 10.7
Anchoring determines where the content
appears within a component.
 
 
 
Search WWH ::




Custom Search