Creating a Custom Java WizardPanel

Regardless if you want to add an interactive wizard panel, execute a series of commands with no user interaction, or launch another program, you must create a class that extends the WizardPanel class. Important: No classes that you add to the Custom panel may be self-standing programs. Your custom class must extend WizardPanel and a WizardPanel can launch another program in a separate thread (see the in the Samples subdirectory).

The WizardPanel is in the com.denova.ui package and uses classes from the and com.denova.util packages. You should modify your compiler's classpath to include the full path to the JExpressInstaller directory so your import statements can find the packages in the JExpress API. Do not include the JExpress installation directory in your classpath because you don't have a license to distribute all the files included with JExpress.

WizardPanel is a javax.swing.JPanel so you add components to the constructor, as is the norm with Swing, instead of using awt's addnotify.

Use the enter() and leave() methods to add functionality to your installer, updater, or uninstaller. Your custom classes appear in the wizard at the point that you specified in the Custom panel. You must start JExpress using the Advanced interface to add custom classes.

If you're adding any custom panels which display text to the users, then you should localize the text for the languages that JExpress supports.

Also, if you add any additional files to the user's system during installation, then you should add the commands to the Uninstaller.

Important: All custom panels are instantiated at the beginning of the installer so the instantiation should only handle the screen layout. The rest of your code should be invoked inside the enter() and leave() methods. These methods are called from Swing's event queue (EDT) so if your class doesn't anything time consuming, then you should use Swinger, SwingWorker, or SwingRunner classes to manage updating the screen and working in background.

Custom Classes

If your installer includes any custom classes, then you must make sure that each class does not require user input when the installer runs silently. Additionally insure that all isOk() methods in your custom classes return true when run silently.

Use the SilentInstall property to determine if the installer is being run silently.

See also