Mariusz,

the "proper" way to do things here depends on many details.

one way: move some stuff from main() into App's ctor:
e.g.
//// pseudocode ////////////////////////////////
class App {
  private Frame myFrame;
  public App {
    myFrame = new Frame();
    myFrame.add(this);

    JButton callWizard;
    callWizard.addActionListener(this);
  }

  public Frame getFrame() { return myFrame; }

  public actionPerformed(ActionEvent e) {
    if (e==callWizard) {
      JDialog myWizard = new JDialog(myFrame);
      ...
    }
  }

  public static void main() {
    App myApp = new App();
    myApp.getFrame.show();
}


another way: have App subclass Frame:
e.g.
//// pseudocode ////////////////////////////////
class App extends Frame {
  public App {
     JButton callWizard;
    callWizard.addActionListener(this);
  }


  public actionPerformed(ActionEvent e) {
    if (e==callWizard) {
      JDialog myWizard = new JDialog(this);
      ...
    }
  }

  public static void main() {
    App myApp = new App();
    myApp.show();
}

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