Designing Java GUIs with the GUI Builder

See Also

The IDE's GUI Builder enables you to design GUI's (graphical user interfaces) visually. As you create and modify your GUI, the IDE automatically generates the Java code to implement the interface. GUI forms are indicated by form nodes (Image of a form icon) in the Projects, Files, and Favorites windows.

Using the GUI Builder

Whenever you open a GUI form, the IDE displays it in a Editor tab with toggle buttons enabling you to switch between Source and Design views. The Design view enables you to work with GUI forms visually while the Source view permits editing of the form's source code directly. Each time you select a form's Design toggle button, the Palette, Inspector, and Properties windows appear automatically.

Typically, components are added to a form using the Palette window and arranged in the GUI Builder workspace. As you work, the GUI Builder automatically displays guidelines suggesting preferred alignment and anchoring for the components you add. Using the Inspector window in conjunction with the Properties window, you can then examine and adjust properties of a form's components and layout managers, manage component event handlers, and define how code is generated.

Guarded Blocks

As you work with a form in the Design view, code is generated automatically by the GUI Builder and is displayed in the Source view with a blue background. This code is called guarded text and is not directly editable.

Guarded text generated by the GUI Builder's includes:

GUI Form Hierarchy in the IDE

The IDE's Inspector window provides a hierarchical tree view of the form's various components. Each form is represented by a root node (icon for root node) within which all components in the form's class are contained. All other GUI components are organized into one of the following two subnodes:

Notes:

See Also
Creating a New Form
About Layout Managers
Deploying Java GUI Applications

Legal Notices