The visual editor Design and Source views

The visual editor for Java is divided into two main windows: the Design view and the Source view. The Design view previews the Java beans in a graphical representation, while the Source view shows the associated Java code.

Visual beans that are SWT, Swing, or AWT components, or subclasses of these components, are shown in the Design view with their graphical representation. As you modify the Java beans in the Design view, the source is updated. Conversely, as you change the Java source, the Design view updates to reflect the changes you make. Also, if you make changes to your .java source file in another editor, your changes will be reflected in the Design window of the visual editor.

The visual editor for Java, by default, shows the Design view above the Source view on a split pane. The Design view is a WYSIWYG surface, or canvas, where you can compose the GUI that you are building. The Source view shows the contents of the Java file. The collapsible palette is on the right side of the Design view by default. The palette includes selection tools and components that you can add to the design.

Design and Source views

You can change the default so that the Design and Source views are notebook tabs, allowing you to click back and forth between them. To change the default, click Window > Preferences > Java > Visual Editor. Select the Appearance tab, then click On Separate notebook tabs. Close the visual editor for Java, then open it again to refresh your preference change.

(C) Copyright IBM Corporation 1999, 2004. All Rights Reserved.