When you work in the Visual Editor for Java, you can change the properties of many beans just by manipulating objects in the Design view. For example, you can change the bounds of a frame by selecting the bean in the Design view and then clicking and dragging the handles on its border. The new values are reflected in the generated source code and in the Properties view.
Some entries, such as text strings, can be edited directly in the Design view. To open a direct edit box, drop a bean onto the JFrame, then click. To open the direct edit box for a bean already on the frame, select the bean, then click. Direct edit can also be invoked using the 'Set [property]' item on the context menu on the graphical canvas and the beans view.
In both instances, a direct edit text box will open, allowing you to type text.
For example, the following shows the text 'Check box', typed into the edit box after selecting the Swing component 'JCheckbox':
To change other properties, open the Properties view ( Window > Show View > Properties), find the property, and select its Value column. For instructions on navigating and customizing the Properties view, refer to the related topic on viewing bean properties.
There are three ways to edit properties in this view:
Regardless of whether you modify the bean in the Design view or the Properties view, the set method in the code is immediately updated. You can always make changes directly in the source view as well, in which case your changes will automatically be reflected in the Design view and the Properties view.
Classes that implement the interface java.awt.Action can be added to a JMenu, JPopupMenu, and JToolBar in both the Graph viewer and the Beans viewer, but can only be selected, moved, and removed in the Beans viewer.