The Java Visual Editor

The visual editor for Java is a code-centric Java editor that helps you design applications that have a graphical user interface (GUI). The visual editor is designed to work with .java source files, letting you edit the source and the design simultaneously. The visual editor supports Standard Widget Toolkit (SWT), the Abstract Window Toolkit (AWT), or Swing components.
Image of the Java visual editor in the workspace.


The Java Visual Editor

The visual editor for Java editor is divided into two windows: the Design view previews the Java beans in a graphical representation, and the Source view shows the associated Java code. As you modify the Java beans in the Design view, the source is updated. Conversely, as you change the source files, the Design view is updated to reflect the changes you make.
Image of the Java visual editor split panes in the workspace.


Component palette

The visual editor for Java includes a palette of components and other selection tools for you to use in the Design view.

By default, the design palette displays to the left of the Design view in the visual editor for Java.
Image of a Java visual editor palette.


SWT Support

The visual editor for Java now includes Eclipse based SWT support.
Image of a Java visual editor palette with an SWT application and components.


Alternate views

The Java Beans view of the visual editor for Java shows a tree view of the components, events, and listeners used by the Java class that you are composing. You can jump to any point in your code by choosing an item in the tree.

The Properties view shows the properties for the selected Java bean that is selected in either the Design view or the Java Beans view. You can change or add new code values directly in the Properties view.
Image of the Java Beans and Properties views.


Layout

The visual editor provides layout managers and alignment controls that make it easy to visually layout your application.
Image of the JVE layout grid manager.


Dynamic data binding

The Java visual editor allows you to bind user interface components graphically and without editing source code. Data can be pulled from Web services, enterprise beans and Java beans.
Image of JVE data binding.


Binding data to visual components

In order to bind Java visual components, you need to first create a data object that can provide appropriate data for the visual component.

For example, a JTable requires an array of objects, so you need a row data object. A JTextField on the other hand typically only needs a single property in a data object, so you need a basic data object.
Image of JVE binding data to a table component.




After you write a Java class using the visual editor for Java, you can run it to test and debug the run-time behavior.

To debug a Java bean while you are testing it, you can switch to the Debug perspective, where you can see the Java processes and use breakpoints and step through the code.
Image of the debugging view with JVE.