Documentation

Contents

 

Eclipse plug-in

This plug-in integrates JFormDesigner into Eclipse and other Eclipse based IDEs (e.g. JBuilder 2007).

Benefits

Using this plug-in has following benefits compared to JFormDesigner stand-alone edition:

  • Fully integrated as editor for JFormDesigner .jfd files. Create and design forms within Eclipse. No need to switch between applications.
  • Uses the source folders and classpath of the current Eclipse project. No need to specify them twice.
  • The Java code generator updates the .java file in-memory on each change in the designer. You can design forms and edit its source code without the need to save them (as necessary when using JFormDesigner stand-alone edition).
  • Folding of generated GUI code in Java editor.
  • Go to event handler method in Java editor. Double-click on the event in the Structure view to go to the event handler method in the Java editor of Eclipse.
  • Two-way synchronization of localized strings in designer and in properties file editors. Changing localized strings in the designer immediately updates the .properties file in-memory and changing the .properties file updates the designer.
  • Copy needed libraries (JGoodies Forms, TableLayout, etc) to the project and add them to the classpath of the current Eclipse project. Optionally include source code and javadoc.
  • Integrated with Eclipse's Version Control Systems.
  • Integrated into refactoring: Copy, rename, move or delete .jfd files when coping, renaming, moving or deleting .java files.

User interface

The screenshot below shows the Eclipse main window editing a JFormDesigner form. JFormDesigner adds the menu Form to the main menu.

Eclipse main window

A JFormDesigner editor consists of:

  • Toolbar: Located at top of the editor area.
  • Palette: Located at the left side.
  • Design View: Located at the center.
  • Structure View: Located in Eclipse's Outline view.
  • Properties View: Located in Eclipse's Properties view.
  • Error Log View: Automatically opens on errors in a view at the bottom. This view is minimized in the above screenshot.

Creating new forms

You can create new forms in Eclipse's Package Explorer view. First select the destination package or folder, then invoke Eclipse's New command and choose JFormDesigner Form. If it is not in the sub menu, select Other, which opens Eclipse's New dialog and choose JFormDesigner Form form the list of wizards.

New Form Menu

In the New JFormDesigner Form dialog, enter the form name (which is also used as class name), choose a superclass, a layout manager and set localization options.

New Form Dialog

After clicking OK, the form will be created and opened.

Open forms for editing

You can open existing forms the same way as opening any other file in Eclipse. Locate it in Eclipse's Package Explorer view and double-click it.

Go to Java code

JFormDesigner adds a button to its toolbar that enables you to switch quickly from a JFormDesigner form editor to its Java editor.

Go to Java code

Code folding

To move the generated code out of the way, JFormDesigner folds it in the Java editor.

Code folding

Convert NetBeans and IntelliJ IDEA forms

You can convert existing NetBeans and IntelliJ IDEA forms to JFormDesigner forms. Right-click on the form file and select Convert to JFormDesigner Form.

 Convert forms

Note: When converting an IntelliJ IDEA form, JFormDesigner inserts its own generated GUI code into the existing Java class, but does not remove IDEA's GUI code. You have to remove IDEA's component variables and initialization code yourself.

Preferences

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. See Preferences for details.

« previous | next »