01: package com.nexes.test;
02:
03: import com.nexes.wizard.*;
04:
05: import javax.swing.*;
06:
07: public class Main {
08:
09: public static void main(String[] args) {
10:
11: Wizard wizard = new Wizard();
12: wizard.getDialog().setTitle("Test Wizard Dialog");
13:
14: WizardPanelDescriptor descriptor1 = new TestPanel1Descriptor();
15: wizard.registerWizardPanel(TestPanel1Descriptor.IDENTIFIER,
16: descriptor1);
17:
18: WizardPanelDescriptor descriptor2 = new TestPanel2Descriptor();
19: wizard.registerWizardPanel(TestPanel2Descriptor.IDENTIFIER,
20: descriptor2);
21:
22: WizardPanelDescriptor descriptor3 = new TestPanel3Descriptor();
23: wizard.registerWizardPanel(TestPanel3Descriptor.IDENTIFIER,
24: descriptor3);
25:
26: wizard.setCurrentPanel(TestPanel1Descriptor.IDENTIFIER);
27:
28: int ret = wizard.showModalDialog();
29:
30: System.out
31: .println("Dialog return code is (0=Finish,1=Cancel,2=Error): "
32: + ret);
33: System.out.println("Second panel selection is: "
34: + (((TestPanel2) descriptor2.getPanelComponent())
35: .getRadioButtonSelected()));
36:
37: System.exit(0);
38:
39: }
40:
41: }
|