Setting Component Properties at Design Time
The Properties page in the Property Inspector displays the properties of
the component selections you make in the Java Visual Editor. You the
Properties page to set the property values at design time for any
component in your UI design.
To set a component's properties at design time:
-
Select a component in the Java Visual Editor or in the Structure
window.
-
To display the Property Inspector with the values for the selected
component, choose View
Property Inspector or right-click the component in the Java
Visual Editor and choose Property Inspector
.
-
Click the Properties tab of the Property
Inspector to give it focus.
-
Scroll until the property you want is visible, then select it with the
mouse or the arrow keys.
OR
Click
in the Property Inspector toolbar and type the name of the property in the
text field. Press Enter to display the
property in the Inspector.
-
Enter the value in the right column one of the following ways:
-
When there is only a text field, you simply type the string value
for that property, for example a text value or a number value,
then press Enter.
-
When the value field is displayed with a down arrow, click the
down arrow and choose a value from the list, then press Enter.
-
When the value field has shows
, click it to display a property editor for that property, for example, a
color or font selector. Set the values in the property editor,
then press OK.
To set properties for multiple components:
-
Do one of the following to select the group of components to be
changed:
-
Hold down the Ctrl key and select each
of the components.
-
Hold down the left mouse button and draw a "lasso" around the
group of components you want to change.
-
To change the list of properties displayed by the Property Inspector,
click the Union button in the Property
Inspector toolbar:
-
Selected state
displays all the properties of the selected components
-
Unselected state
displays only the properties the selected components have in common
-
Select and edit the desired property in the Property Inspector. If the
value is shown in italic font, that means the value belonging to the
anchor component's value differs from the the other selected
components. Editing the value of a shared property will cause all
selected components to have the same value.
Note: The Ctrl key causes the selection state of the
selected object to be toggled (from either not selected to selected,
else from selected to not selected). Using the Shift key to make
selections also changes the object's anchor usage:
-
If the object is not yet selected, it will become selected and become
the anchor
-
If the object is already selected, it will just become the anchor.
Using either the Ctrl or Shift key, if a control goes from being not
selected to selected, it will become the new anchor until the user
changes the anchor using the Shift select action.
Related Topics
About Component Properties in the
Inspector
Copyright © 1997, 2004, Oracle. All rights reserved.