Runtime Library

Note: If you use the Java code generator, you don't need this library.

The open-source (BSD license) runtime library allows you to load JFormDesigner .jfd files at runtime within your applications. Turn off the Java code generation in the Preferences dialog or in the Project settings if you use this library.

You'll find the library jfd-loader.jar in the redistributables of the JFormDesigner installation; the source code is in and the documentation is in

The API documentation is also available here:


  • FormLoader provides methods to load JFormDesigner .jfd files into in-memory form models.
  • FormCreator creates instances of Swing components from in-memory form models and provides methods to access components.
  • FormSaver saves in-memory form models to JFormDesigner .jfd files. Can be used to convert proprietary form specifications to JFormDesigner .jfd files: first create an in-memory form model from your form specification, then save the model to a .jfd file.


The following example demonstrates the usage of FormLoader and FormCreator. It is included in the examples distributed with all JFormDesigner editions.

public class LoaderExample
    private JDialog dialog;

    public static void main(String[] args) {
        new LoaderExample();

    LoaderExample() {
        try {
            // load the .jfd file into memory
            FormModel formModel = FormLoader.load(

            // create a dialog
            FormCreator formCreator = new FormCreator(formModel);
            dialog = formCreator.createDialog(null);

            // get references to components
            JTextField nameField = formCreator.getTextField("nameField");
            JCheckBox checkBox = formCreator.getCheckBox("checkBox");

            // set values
            nameField.setText("enter name here");

            // show dialog

        } catch(Exception ex) {

    // event handler for checkBox
    private void checkBoxActionPerformed(ActionEvent e) {
        JOptionPane.showMessageDialog(dialog, "check box clicked");

    // event handler for okButton
    private void okButtonActionPerformed() {