this might be a stupid question but how can I give the JDialog my app's
Frame?

I have it setup this way:

//// pseudocode ////////////////////////////////
class App {
  public App {
    JButton callWizard;
    callWizard.addActionListener(this);
  }

  public actionPerformed(ActionEvent e) {
    if (e==callWizard) {
      JDialog myWizard = new JDialog();
      myWizard.getContentPane().add(new WizardDialog());
      myWizard.setSize(500,350);
      myWizard.setModal(true);
      myWizard.show();
    }
  }

  public main() {
    App myApp = new App();
    Frame myFrame = new Frame();
    myFrame.add(myApp);
  }
}



In order to give it a reference I would have to make my Frame (myFrame) to
be a
global variable, right? ie. declare it as a App class variable.

is that right? I can't think well today so this might be totally wrong.


   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: Hans & Susan Horn [mailto:[EMAIL PROTECTED]
Sent: Friday, November 28, 2003 11:39 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] ? Java Wizard ?


Mariusz,

if you want the JDialog to stay on-top of things, you need to give it
reference to your app's frame (via ctor).
I you don't do that, the JDialog will use a hidden shared frame instance,
and you'd lose some of its advantages.

As to how to get your data from the WizardDialog to my main application I'd
recommened following Florin's suggestion!

cheers,
H.

===========================================================================
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".

Reply via email to