Directly editing items in the Design view

Some text properties can be directly edited on the Design view of the visual editor.

When you work in the visual editor for Java, you can change the properties of many components just by manipulating them in the Design view. For example, you can edit the text strings for most components that include labels. The new values are reflected in the Source view and in the Properties view. Adding text strings can also affect visual layout, which will be reflected in the Design view. For example, a long text string for a button can affect the alignment and size of the button.

Tip: You can also directly edit items by selecting Set [property] from the context menu, in both the Java Beans view and the Design view. For example, you can right-click a JLabel and select Set text.

To directly edit the text for a component in the Design view:

  1. Select the component in the Design view.

  2. Click the component again. A direct edit text field displays in the upper left corner of the component.

  3. Type the text that you want to use for the component, and press Enter.

The text that you typed will reflect in the Design view, in the source (the set method), and in the Properties view for that particular property.

 

Parent topic

Changing component properties

 

Related concepts

The visual editor Design and Source views