1. A custom About dialog box

The idea is to replace the standard "About..." action found in the Help menu (this action is called "aboutAction" — see DesktopApp.xxe_gui) by an action of our own. Our custom action will display our custom dialog box.

Excerpts from AboutAction.java:

public class AboutAction extends AppAction {
    private ImageIcon icon;

    public void doIt() {1
        if (icon == null) {
            icon = new ImageIcon(AboutAction.class.getResource(
                                     "icons/aboutAction.png"));
        }

        JOptionPane.showMessageDialog(app.getFrameHost(),2
                                      "A Customized XMLmind XML Editor.",
                                      getLabel(),
                                      JOptionPane.PLAIN_MESSAGE,
                                      icon);
    }

    public void updateEnabled() {3
        // Always enabled.
    }
}

1

All AppActions must implement doIt and updateEnabled.

2

All dialog boxes opened by actions must use App.getFrameHost as their parent (also called “their owner”).

3

This implementation of updateEnabled is trivial. Another very simple and very common implementation of updateEnabled is (example: PrintAction):

    public void updateEnabled() {
        setEnabled(app.getActiveXMLEditor() != null);
    }