Documentation
Preferences
This dialog is used to set user preferences.
Stand-alone: Select Window > Preferences from the menu to open this dialog.
Eclipse plug-in: The JFormDesigner preferences are fully integrated into the Eclipse preferences dialog. Select Window > Preferences from the menu to open it and then expand the node "JFormDesigner" in the tree.
IntelliJ IDEA plug-in: IntelliJ IDEA uses the term "Settings" instead of "Preferences". The JFormDesigner preferences are fully integrated into the IntelliJ IDEA settings dialog. Select File > Settings from the menu to open it and then click the icon named "JFormDesigner".
JBuilder plug-in: The JFormDesigner preferences are fully integrated into JBuilder preferences dialog. Select Tools > Preferences from the menu to open it.
Pages
- General
- FormLayout (JGoodies)
- null Layout
- Localization
- Look and Feels
- Java
Code Generator
- Templates
- Layout Managers
- Localization
- Code Style (Stand-alone only)
- Client Properties
- Native Library Paths
- BeanInfo Search Paths
- Squint Test
Import and export preferences
You can use the Import button to import preferences from a file and the Export button to export preferences to a file. This preferences file is compatible with all JFormDesigner editions. On export, you can specify what parts of the preferences you want export.
Eclipse plug-in: You can use the menu commands File > Import and File > Export to import and export preferences to/from Eclipse preferences files.
IntelliJ IDEA plug-in: You can use the menu commands File > Import Settings and File > Export Settings to import and export settings to/from IntelliJ IDEA preferences files.
JBuilder plug-in: Import and export of preferences is not supported.
Note: Each IDE uses its own file format for preferences. The only way to transfer preferences between the different JFormDesigner editions is to use JFormDesigner preferences files.
Restore defaults
Use the Restore Defaults button to restore the values of the active page to its defaults.
General¶
On this page, you can specify general options.

| Option | Description | Default |
|---|---|---|
| Animate layout changes in Design view | If enabled, changes to the layout in the Design view are done animated. | On |
| Animation speed | The speed of the animation. |
default |
| Buffer Design view in video memory | If enabled, parts of the Design view are buffered in the video
memory of the graphics card to improve painting speed. |
On |
| Undo history size | The maximum number of steps in the undo history of a form. | 1000 |
FormLayout (JGoodies)¶
On this page, you can specify FormLayout related options.

| Option | Description | Default |
|---|---|---|
| IntelliGap | If enabled, JFormDesigner automatically inserts/removes gap columns/rows. | On |
| JGoodies Forms version | Required JGoodies Forms version for the created forms. JGoodies Forms 1.0.3 and later require Java 1.4 or later. JGoodies Forms 1.0.2 is the last version that supports Java 1.3. | 1.2 or later |
| Column/row templates for new columns/rows | Here you can specify the column and row templates that should be used when new columns or rows are inserted. | |
| Column | The column template used for new columns. | default |
| Column gap | The column template used for new gap columns. | label component gap |
| Row | The row template used for new rows. | default |
| Row gap | The row template used for new gap rows. | line gap |
| Custom column/row templates | If the predefined templates does not fit to your needs, you can define your own here. Since JGoodies Forms 1.2 you can add these custom column/row templates to the global LayoutMap using the "LayoutMap Initialization Code" link. |
Custom column/row templates¶

| Option | Description |
|---|---|
| Display name | The display name is used within JFormDesigner whenever the template is shown in combo boxes or popup menus. |
| Identifier | The (unique) identifier is stored in form files. Choose a short string. Only letters and digits are allowed. |
| Use for | Specifies whether the template should be used for columns, rows or both. Also specifies whether it represents a gap column/row. |
| Default alignment | The default alignment of the components within a column/row. Used if the value of the component constraint properties "h align" or "v align" are set to DEFAULT. |
| Size | The width of a column or height of a row. You can use default, preferred or minimum component size. Or a constant size. It is also possible to specify a minimum and a maximum size. Note that the maximum size does not limit the column/row size if the column/row can grow (see resize behavior). |
| Resize behavior | The resize weight of the column/row. |
| Java code | Optional Java code used by the Java code generator. Useful if you have factory classes for ColumnSpecs and RowSpecs. Not available for JGoodies Forms 1.2 and later. |
null Layout¶
On this page, you can specify null layout related options.

| Option | Description | Default |
|---|---|---|
| Snap to grid | If enabled, snap to the grid specified below when moving or resizing a component in null layout. | On |
| Grid X step | The horizontal step size of the grid. | 5 |
| Grid Y step | The vertical step size of the grid. | 5 |
Localization¶
On this page, you can specify localization related options.

| Option | Description | Default |
|---|---|---|
| Rename resource keys when renaming components | If enabled, auto-rename resource keys when renaming components and the resource key contains the old component name. | On |
| Copy localized messages when copying components | If enabled, duplicate localized strings in all locales when copying components. | On |
| Delete localized messages when deleting components | If enabled, auto-delete localized strings, that were used by the deleted components, from all locales. | On |
| Delete localized messages when internalizing strings | If enabled, auto-delete localized strings, that were internalized, from all locales. | On |
| Delete messages only if key prefix is equal to form's key prefix | If enabled, messages will be auto-deleted only if there key prefix is equal to the key prefix of the form. | On |
| Insert new messages | Specifies where new messages will be inserted into properties files. "next to similar keys" inserts new messages next to other similar keys so that messages that belong together are automatically at the same location in the properties file. "at the end of the properties file" always appends new messages to the end of the properties file. | next to similar keys (ascending order) |
| Separator used for generated keys | Separator used when generating a resource key. | '.' |
| Template for properties files | Template used when creating new properties files. | |
| Exclude properties from externalization | Specify properties that should be excluded from
externalization. Useful when using auto-externalization to ensure that
some string property values stay in the Java code. If the list is focused, you can use the Insert key to add a property or the Delete key to delete selected properties. |
Look and Feels¶
On this page, you can add Swing look and feels for use in the Design view.
Note: Because Swing is not designed to use two look and feels at the same time (application and Design view), it can not guaranteed that each look and feel works without problems.

If the look and feels list is focused, you can use the Insert key to add a look and feel or the Delete key to delete selected look and feels.

| Option | Description |
|---|---|
| Jar path | Full path name of the jar file that contains the look and feel classes. Use the Browse button to select a jar. |
| Name | Name of the look and feel used in the look and feel combo box in the Main Toolbar. |
| Class name | Class name of the look and feel
class (derived from javax.swing.LookAndFeel). |
| License code | License code for the commercial Alloy Look and Feel. |
Java Code Generator¶
On this page, you can turn off the Java code generator and specify other code generation options.

| Option | Description | Default |
|---|---|---|
| Generate Java source code | If enabled, JFormDesigner generates Java source code when you save a form. | On |
| Source compatibility | Specifies the compatibility of the generated source code. Besides generating Java 1.x compatible source code, JFormDesigner can also use Java 5 (or later) features in the generated source code (e.g. auto-boxing, @Override, etc). | Stand-alone: use JRE
version IDE plug-ins: use project setting |
| Explicit imports | If enabled, the code generator adds explicit import statements (without '*') for used classes. | Off |
| Container blocks | If enabled, the code generator puts the initialization code for each container into a block (enclosed in curly braces). | On |
| Comments | If enabled, the code generator puts a comment line above the initialization code for each component. | On |
| Set component names | If enabled, the code generator inserts java.awt.Component.setName()
statements for all components of the form. |
Off |
| Eclipse non-nls tags (//$NON-NLS-n$) | If enabled, the code generator appends non-nls comments to lines containing strings. These comments are used by the Eclipse IDE to denote strings that should not be externalized. | Off |
| NetBeans no-i18n tags (//NOI18N) | If enabled, the code generator appends non-nls comments to lines containing strings. These comments are used by the NetBeans IDE to denote strings that should not be externalized. | Off |
| Use 'this' for member variables | If enabled, the code generator inserts 'this.'
before all member variables. E.g. this.nameLabel.setText("Name:"); |
Off |
| Member variables prefix | Prefix used for component member variables. E.g. "m_". | |
| Class modifiers | Class modifiers used when
generating a new class. Allowed modifiers: public, default,
abstract and final. |
public |
| Nested class modifiers | Class modifiers used when
generating a new nested class. Allowed modifiers: public,
default, protected, private,
abstract, final
and static. |
private |
You can set additional options per form in the "(form)" properties.
Templates (Java Code Generator)¶
This page contains templates that are used by the code generator when generating a new class. See Code Templates for details about templates.

New: Create a new template for a specific superclass.
Edit: Edit the superclass of the selected user-defined
template.
Remove: Remove the selected template. Only allowed for
user-defined templates.
Reset: Reset the selected predefined template to the default.
Insert Variable: Insert a variable at the current cursor
location into the selected template.

Layout Managers (Java Code Generator)¶
On this page, you can specify code generation options for some layout managers.

| Option | Description | Default |
|---|---|---|
| Use PanelBuilder in generated code | If enabled, the PanelBuilder class of JGoodies Forms is used for FormLayout. | Off |
| Use empty GridBagConstraints constructor | If enabled, the empty GridBagConstraints constructor is used in the generated code, which is necessary for Java 1.0 and 1.1 compatibility. Since Java 1.2, GridBagConstraints has a constructor with parameters, which is used by default. | Off |
| GroupLayout Generation Style | Specifies whether class javax.swing.GroupLayout is used, which is part of Java 6 and later. Or whether org.jdesktop.layout.GroupLayout from the Open Source Swing Layout library swing-layout.jar is used, which is also available for Java 1.4 and 5. | use source compatibility (see Java Code Generator preferences page) |
| TableLayout package | Package name used by the Java code generator for TableLayout. Change this only if you have a copy of the original TableLayout in another package. | info.clearthought.layout |
Localization (Java Code Generator)¶
On this page, you can specify code generation options for localization.

| Option | Description | Default |
|---|---|---|
| Generate initComponentsI18n() method | If enabled, the code generator puts the code to initialize the localized texts into a method initComponentsI18n(). You can invoke this method from your code to switch the locale of a form at runtime. You can set this options also per form in the "(form)" properties. | Off |
| 'getBundle' template | Template used by code generator for getting a resource bundle. | ResourceBundle.getBundle (${bundleName}) |
| 'getString' template | Template used by code generator for getting a string from a resource bundle. | ${bundle}.getString(${key}) |
Code Style (Java Code Generator)¶
Stand-alone: On this page, you can specify code style options, which are used for code generation.
IDE plug-ins: This page is not available in IDE plug-ins because IDEs already have preferences that control code style. JFormDesigner uses the code style settings from IDE projects or preferences.

| Option | Description | Default |
|---|---|---|
| Indent size | The number of spaces used for one indentation
level. |
4 |
| Tab size | The number of spaces that
represents one tabulation. |
4 |
| Use tab character | Specifies whether the tab character
(\t) is used for indentation or only space characters. |
On |
| Line separator | The line separator used for newly created .java and .properies files. | Platform default |
| Encoding | The character encoding used for reading and writing Java files. | Platform default |
Client Properties¶
On this page, you can can define client properties, which can be set in the Properties view.

If the client properties list is focused, you can use the Insert key to add a client property or the Delete key to delete selected client properties.

| Option | Description |
|---|---|
| Key | The key that identifies the client property. |
| Component class | The component class to which the client property belongs. E.g. if set to javax.swing.JButton, then the client property is shown in the Properties view for buttons and for subclasses of JButton. If not specified, the client property is shown for all components. |
| Value type | The type of the client property value. You can select one of the common types (String, Boolean, Integer, etc) from the combo box or enter the class name of a custom type. |
| Predefined values | If the value type is java.lang.String, then you can specify predefined values for the client property. When editing the client property in the Properties view, a combo box that contains these values is shown. The combo box is editable by default. Select the "Allow only predefined values" check box to make the combo box not-editable. |
| Property editor class | Optional class name of a property editor that should be used when editing the client property in the Properties view. |
Native Library Paths¶
On this page, you can specify the locations of custom JavaBeans that use native libraries and you can specify the folders where to search for the native libraries.
Note: When removing or changing paths, a restart of JFormDesigner (or the IDE) is probably necessary to make the changes work.

| Option | Description |
|---|---|
| Classpath for JavaBeans, which use native libraries | JAR files or folders containing .class files, which are using native libraries. They must be specified here to ensure that the native libraries are loaded from a special class loader only once. |
| Native Library Path | Folders used to search for native libraries. |
BeanInfo Search Paths¶
On this page, you can specify package names that will be used for finding BeanInfo classes and property editors.

| Option | Description |
|---|---|
| BeanInfo search path | Package names that will be used for finding BeanInfo classes. Only necessary if the BeanInfo class is not in the same package as the component class to which it belongs. See java.beans.Introspector and Introspector.setBeanInfoSearchPath() for details. |
| Property editor search path | Package names that will be used for finding property editors. Only necessary if the property editor is not in the same package as the property type to which it belongs. See java.beans.PropertyEditorManager and PropertyEditorManager.setEditorSearchPath() for details. |
Squint Test¶
The page allows you to specify the squint level for the squint test (menu View > Squint Test).
