Java Reference
In-Depth Information
Figure 10.5
A preview of the dialog, which looks right but
still has no functionality behind it.
cushion. To do this, select the top-level JP anel, and enter appropriate values into
the margin fields using the Properties Inspector. The final dialog is shown in
action in figure 10.5.
10.4 Understanding properties
Once you've created a basic layout for your form, you can use the Properties
Inspector to fine-tune the alignment and other properties necessary to achieve
the finished interface. The shaded properties at the top of the Properties Inspec-
tor are proprietary to IDEA ; they're mainly used to control the layout of your user
interface. Many of these properties appear only after you've added a layout to the
component's container. We'll discuss each of them in turn throughout this chap-
ter, but you can see a brief summary of their usage in table 10.2. Some properties
(such as margins ) are only available to container components.
Table 10.2 Many of the properties found in the Properties Inspector are used to control the layout
of the containers and their components.
Property
Effect
Specifies the instance variable to which this component is bound
binding
Adds a decorative border around the container
border
Creates padding between the container and its contents
margins
Specifies the amount of horizontal spacing between cells
Horizontal Gap
Specifies the amount of vertical spacing between cells
Vertical Gap
Horizontal Size Policy
Determines how the component can be resized horizontally
Vertical Size Policy
Determines how the component can be resized vertically
continued on next page
 
 
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search