umm I tried it...and here is the code snippet...I relabled the myWizard and myDialog because I had them flipped around...was hard to read it.
Inside my Application I have this code snippet when pressing a button: final JDialog myDialog = new JDialog(myFrame); WizardDialog myWizard = new WizardDialog(myDialog); myDialog.getContentPane().add(myWizard); myDialog.setModal(true); myDialog.show(); // 'value' is an instance variable declared within myWizard (double value) System.out.println("Value(s) from the Wizard: "+myWizard.value); Then in the Wizard JPanel I have the following code for the "Cancel" button: myDialog.hide(); Note, I had to make the myDialog final (at the request/demand of the compiler). Thanks for the help, you all are awesome! Mario Mariusz Zaczek NASA - Johnson Space Center Automated Vehicles and Orbit Analysis / DM35 Flight Design and Dynamics Division Mission Operations Directorate Bldg: 30A Room: 3040A Disclaimer: "The opinions, observations and comments expressed in my email are strictly my own and do not necessarily reflect those of NASA." "Failure is never quite so frightening as regret." - Cliff's wife (The Dish) -----Original Message----- From: Florin Herinean [mailto:[EMAIL PROTECTED] Sent: Friday, November 28, 2003 9:53 AM To: [EMAIL PROTECTED] Subject: Re: [JAVA3D] ? Java Wizard ? Hi Mario, it's better to be a JDialog, mainly if you want it to be a modal one. I've done it several times and it's working great. So, create the JDialog, put your wizard inside, don't forget to call on the dialog setModal(true), and when you want to display it just call .show() method. The method won't return until you close the dialog, because it's modal. About passing the values: you just store them inside the dialog as instance variables. Then in the code that invokes show(), after the method returns, you grab the data from there. Cheers, Florin -----Original Message----- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] Behalf Of ZACZEK, MARIUSZ P. (MARIO) (JSC-DM) (NASA) Sent: Freitag, 28. November 2003 16:44 To: [EMAIL PROTECTED] Subject: [JAVA3D] ? Java Wizard ? Ok, I'm posting on Thanksgiving too...I could not resist! And to top that, I'm not even asking a java 3D question...only a java 2D one: I want to add a "Wizard" to my application...basically a window that pops up that guides a user through a series of inputs...I have this built. The only thing I'm having trouble finding is how to make the wizard actually pop up and how best to make it. Basically, does anyone have a code snippet to show my how to pop up my wizard window on top of my application? AND, should this wizard be a JFrame or JPanel or what? ...note that I'll need to be able to send the data from the wizard back to my main program so if you have suggestions for this too then it would be appreciated... thanks, Mario Mariusz Zaczek NASA - Johnson Space Center Automated Vehicles and Orbit Analysis / DM35 Flight Design and Dynamics Division Mission Operations Directorate Bldg: 30A Room: 3040A Disclaimer: "The opinions, observations and comments expressed in my email are strictly my own and do not necessarily reflect those of NASA." "Failure is never quite so frightening as regret." - Cliff's wife (The Dish) ----- =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".