Documentation

Property Editors

Property editors are used in the Properties view to edit property values.

String Property Editor

You can either edit a value directly in the property table or use a custom property editor by clicking on the ellipsis button (Edit) on the right side. The custom editor pops up in a new dialog.

The type of the editor depends on the data type of the property. JFormDesigner has built-in property editors for all standard data types. Custom JavaBeans can provide their own property editors. Take a look at the API documentation of java.beans.PropertyEditor, java.beans.PropertyDescriptor and java.beans.BeanInfo and the JavaBeans topic for details.

Built-in property editors

JFormDesigner has built-in property editors for following data types:

ActionMap (javax.swing)

This (read-only) custom editor allows you to see the actions registered for a component in its action map. The information in the column "Key Stroke" comes from the input map of the component and shows which key strokes are assigned to actions. The JComponent property "actionMap" is read-only. Expand the Read-only Properties category in the Properties view to make it visible.

ActionMap editor

Border (javax.swing)

You can either select a border from the combo box in the properties table or use the custom editor.

Border editor

In the custom editor you can edit all border properties. Use the combo box at the top of the dialog to choose a border type. In the mid area of the dialog you can edit the border properties. This area is different for each border type. At the bottom, you can see a preview of the border.

Border editor

Following border types are supported:

  • BevelBorder
  • CompoundBorder
  • DropShadowBorder (SwingX)
  • EmptyBorder
  • EmptyBorder (JGoodies)
  • EtchedBorder
  • LineBorder
  • MatteBorder
  • SoftBevelBorder
  • TitledBorder
  • Swing look and feel
  • custom borders

Color (java.awt)

In the properties table, you can either enter RGB values, color names, system color names or Swing UIManager color names. When using a RGB value, you can also specify the alpha value by adding a fourth number.

Color editor

The custom editor supports various ways to specify a color. Besides RGB, you can select a color from the AWT, System or Swing palettes.

Color editor

ComboBoxModel (javax.swing)

This custom editor allows you to specify string values for a combo box.

ComboBoxModel editor

Cursor (java.awt)

This editor allows you to choose a predefined cursor.

Cursor editor

Dimension (java.awt)

Either edit the dimension in the property table or use the custom editor.

Dimension editor

Dimension editor

Font (java.awt)

You can either use absolute fonts, derived fonts or predefined fonts of the look and feel. Derived fonts are recommended if you just need a bold/italic or a larger/smaller font (e.g. for titles), because derived fonts are computed based on the current look and feel. If your application runs on several look and feels (e.g. several operating systems), derived fonts ensure that the font family stays consistent.

In the properties table, you can quickly change the style (bold and italic) and the size of the font.

Font editor

In the custom editor you can choose one of the tabs to specify either absolute fonts, derived fonts or predefined fonts.

Font editor Derived Font editor

Icon (javax.swing) and Image (java.awt)

This custom editor allows you to choose an icon. Either use an icon from the classpath, from the file system or from the Swing UIManager (look and feel). It is recommended to use the classpath and embed your icons into your application JAR.

Icon editor

InputMap (javax.swing)

This (read-only) custom editor allows you to see the key strokes registered for a component in its input map. The information in the column "Action" comes from the action map of the component and shows which action classes are assigned to key strokes. The JComponent property "inputMap" is read-only. Expand the Read-only Properties category in the Properties view to make it visible.

InputMap editor

Insets (java.awt)

Either edit the insets in the property table or use the custom editor.

Insets editor

Insets editor

KeyStroke (javax.swing)

In the properties table, you can enter a string representation of the keystroke. E.g. "Ctrl+C" or "Ctrl+Shift+S".

The custom editor supports two ways to specify a keystroke. Either type any key stroke combination if the focus is in the first field or use the controls below.

The KeyStroke editor supports menu shortcut modifier key (Command key on the Mac, Ctrl key otherwise).

KeyStroke editor

ListModel (javax.swing)

This custom editor allows you to specify string values for a list.

ListModel editor

Object (java.lang)

This editor allows you to reference any (non-visual) JavaBean as a property value. Often used for JLabel.labelFor.

Reference editor

Paint (java.awt)

This editor allows you to specify a java.awt.Paint object (used by java.awt.Graphics2D). Use the combo box at the top of the dialog to choose a paint type. In the mid area of the dialog you can edit the paint properties. This area is different for each paint type. At the bottom, you can see a preview of the paint. For GradientPaint you can click-and-drag the handles in the preview area to move the points.

Paint editor

Following paint types are supported:

  • Color
  • GradientPaint

Point (java.awt)

Either edit the point in the property table or use the custom editor.

Point editor

Point editor

Rectangle (java.awt)

Either edit the rectangle in the property table or use the custom editor.

Rectangle editor

Rectangle editor

SpinnerModel (javax.swing)

This custom editor allows you to specify a spinner model (used by JSpinner). Use the combo box at the top of the dialog to choose a spinner model type (Number, Date or List). In the mid area of the dialog you can edit the model properties. This area is different for each model type. At the bottom, you can see a test spinner where you can test the spinner model.

SpinnerModel editor

String (java.lang)

Either edit the string in the property table or use the custom editor. Switch the "allow new-line" check box on, if you want enter new lines.

String editor

String editor

String[] (java.lang)

This custom editor allows you to specify string values for a string array.

String array editor

TableModel (javax.swing)

This custom editor allows you to specify values for a table.

TableModel editor

TreeModel (javax.swing)

This custom editor allows you to specify string values for a tree.

TreeModel editor