Skip to main content

Wizard (netbeans)

No replies
greglev
Offline
Joined: 2010-08-20

Hi everyone,
I have 3 Wizardpages: AnimaltypPage.class, TreePage.class, DetailsPage.class
when I am in the DetailPage ( 3th 'wizardpage), I need the node, that I selected in the second page (TreePage.class). How can I find that?.

public class WizardMain {<br />
	final Class[] pages = new Class[]{ AnimaltypPage.class, TreePage.class, DetailsPage.class };<br />
	public WizardMain(){<br />
		try {<br />
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());<br />
	    } catch (Exception e) {<br />
	            e.printStackTrace();<br />
	    }<br />
		Runnable r = new Runnable (){<br />
			public void run (){<br />
				Wizard wizard = WizardPage.createWizard("Probe", pages);<br />
				WizardDisplayer.showWizard (wizard, new Rectangle (20, 20, 700, 520));<br />
				System.exit (0);<br />
			}<br />
		};</p>
<p>		EventQueue.invokeLater (r);<br />
	}<br />
	public static void main(String[] args) {<br />
		new WizardMain();<br />
	}<br />
}

public class AnimaltypPage{
......
}

[code]public class TreePage extends WizardPage{
private JTree tree;
public TreeWCFPage(){
setLayout(new BorderLayout());
initComponents();
}
public void initComponents(){
TreeModelExtractor converter = TreeModelExtractor.getInstance();
tree = new JTree(converter.getTreeForElement(TreeModelExtractor.GROUP, false, true));//Modell
tree.setRootVisible(true);
JScrollPane treeView = new JScrollPane(tree);
add(treeView, BorderLayout.CENTER);
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
setProblem("W