Exemplo n.º 1
0
  public void quit() {
    super.quit();
    display = null;

    if (displayFrame != null) {
      JFrame f = displayFrame;
      displayFrame = null;
      f.dispose();
    }
  }
  // this method is called when the user close the java window
  public void quit() {
    super.quit();

    // disposing the displayFrame automatically calls quit() on the display,
    // so we don't need to do so ourselves here.
    if (displayFrame != null) {
      displayFrame.dispose();
      displayFrame2.dispose();
    }
    // displayFrame = null;  // let gc
    // displayFrame2=null;
    // display = null;       // let gc
    // display2=null;
  }