Java code generation and parsing in the visual editor

The visual editor generates and parses Java™ code as you design your visual class. The visual editor uses a particular style for its generated Java code, and it has rules for parsing Java code.

The visual editor for Java generates valid Java code that can be properly compiled and run. In addition, when the visual editor parses existing Java code, it uses rules to determine which elements of the code to try to visualize in the Design view.

Rules for parsing code for display on the Design view

The visual editor for Java attempts to visualize code in the Design view if the code meets any of the following criteria:

There are other requirements that the visual editor checks for before visualizing a component on the graphical Design view:

Most expressions are successfully parsed, but not all expressions can be correctly evaluated. In this case a warning sign is shown against the Java bean in the views, and the reason for the failure is shown in the status line when the bean is selected on the Design view or Java Beans view. A warning icon also displays on the canvas:

Warning icon in Design view

Code generated by the visual editor


Feedback