Form Editor Modes

The Form Editor can be in one of three modes:

Design Mode

This is the default Form Editor mode. In this mode, you can click in the form to select, add, or drag components (if the layout being used permits dragging).

In this mode the layout won't necessarily look the same as it does during runtime. Design would be difficult if every layout manager worked exactly the same way at design time as it does at runtime. For example, with some layout managers, when you drop two components next to each other they resize automatically and make it impossible to add a new component between the two.

Real Mode In real mode, the Form window uses the actual runtime layout manager but it does not actually run the application. Real mode provides a very good approximation of how the form will look while running, but you should run the form occasionally to verify that your layout is exactly how you want it.

You can select or add components in real mode, but dragging of components is disabled.

Test Mode

As in real mode, in test mode the form looks very similar to the runtime form. When you click in the form in test mode, mouse events are delivered to the actual components. Thus, for example, a button looks "pressed" when you click it. This mode is suitable for checking the look and feel of the form without compiling and running it.

You cannot select or add components to the form in test mode.

When test mode is switched on, the form is resized to its preferred size. The preferred size is the size of the form if you have not explicitly resized by calling setSize() or setBounds().

Choose a mode by selecting and deselecting the design mode and test mode icons. (These icons can be found near the center of the toolbar, on the bottom row.)

When both the design mode and test mode icons are unselected, you are in real mode. You must deselect test mode before you can select design mode.

These modes are kept separately with each form. When you return to a previously opened form, you are in the Form Editor mode in which you left the form.

See also
Form Editor

Creating a New Form

Working With Layouts

Legal Notices