Configuring the Form Editor
See Also
You can configure the behavior of the Form Editor and the appearance of
the Form Editor window.
To set Form Editor properties, choose Tools
Options.
Expand the Editing node and select Form Editor Settings.
Modify the values to your preferred settings.
Properties Tab
Expert Tab
- Apply Grid to Position.
If True, the position of components is snapped to the grid if a grid is used.
The grid is used for forms that use AbsoluteLayout or Null Layout, and for
JLayeredPane and JDesktopPane components.
- Apply Grid to Size.
If True, the size of components is snapped to the grid if a grid is used.
- Event Variable Name.
The name of the variable generated in the signature of the event handler method for
the event object. For example, evt is the variable name in
private void button1ActionPerformed (java.awt.event.ActionEvent evt).
- Grid X and Grid Y.
Size of the grid in the x and y axis for AbsoluteLayout, Null Layout, JLayeredPane,
and JDesktopPane.
- Listener Generation Style.
Determines how the code for component events and their handlers is generated.
All of the options produce functionally equivalent code, but each option has different
performance qualities. There are three options:
- Anonymous Innerclasses.
One anonymous innerclass is generated for each event. This option might have
negative impact on performance and memory of the application, since a lot
of classes that must be loaded and kept when the form is executed.
- One Innerclass.
One common innerclass is generated for the whole form. This innerclass
implements all necessary listeners and dispatches all events to the attached event
handlers. The resulting code is less compact and slightly less efficient, but
the anonymous innerclasses are eliminated. This option is particularly suitable
for large forms with many components and event handlers.
- Main Class.
The form's main class implements the listeners. No special innerclass for
events is generated. This is the most efficient option, but it does not work
well with all types of forms. This option should only be used if the form class does not
declare any listener implementation that could interact with events that are
generated by components in the form.
- Local Variables.
If True, the variables generated for the components on the form are declared
as local variables in the initComponents() method. If False, the variables
are declared as member fields of the class.
- Property Editor Search Path.
List of packages used to search the property editor to use in the Form Editor.
For example, to use an alternate Color property editor, create ColorEditor
and add its full package name to the beginning of the Property Editor Search Path.
ColorEditor is then used when the Color property is edited.
- Property Editors.
String pairs that explicitly list the property type and the fully
qualified class name of the property editor to use for that type.
- Variables Modifier.
The access modifier for variables generated for components on the form.
See Modifiers Property Editor for more
information.
- Workspace.
The workspace the IDE jumps to when a form object is opened.
Legal Notices