Package java.awt

Examples of java.awt.Window.dispose()


      // Log.debug (currentToolbar.getParent());
      final Window w = SwingUtilities.windowForComponent(toolBar);
      if (w != null)
      {
        w.setVisible(false);
        w.dispose();
      }
    }
    toolBar.setVisible(false);
  }
View Full Code Here


                // ha!, the toolbar is floating ...
                // Log.debug (currentToolbar.getParent());
                final Window w = SwingUtilities.windowForComponent(this.currentToolbar);
                if (w != null) {
                    w.setVisible(false);
                    w.dispose();
                }
            }
            this.currentToolbar.setVisible(false);
        }
    }
View Full Code Here

    }
   
    static class DisposeOnClose extends ComponentAdapter implements Serializable{
        public void componentHidden(ComponentEvent e) {
            Window w = (Window)e.getComponent();
            w.dispose();
        }
    }
   
}
View Full Code Here

  }
 
  public void restoreScreen() {
    Window window = device.getFullScreenWindow();
    if (window != null) {
      window.dispose();
    }
    device.setFullScreenWindow(null);
  }
 
  public BufferedImage createCompatibleImage(int w, int h, int transparency) {
View Full Code Here

    setResizable(false);

    addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        Window aboutDialog = e.getWindow();
        aboutDialog.dispose();
      }
    });

    pack();
  }
View Full Code Here

   * Restores the screen's display mode.
   */
  public void restoreScreen() {
    Window window = device.getFullScreenWindow();
    if (window != null) {
      window.dispose();
    }
    device.setFullScreenWindow(null);
  }

  /**
 
View Full Code Here

   */
  private void restoreScreen()
  {
    Window w = gd.getFullScreenWindow();
    if (w != null)
      w.dispose();
    gd.setFullScreenWindow(null);
  } // end of restoreScreen()

  // ------------------ display mode methods -------------------

View Full Code Here

 
  //get out of fullscreen
  public void restoreScreen() {
    Window w = vc.getFullScreenWindow();
    if(w != null) {
      w.dispose();
    }
    vc.setFullScreenWindow(null);
  }
 
  //create image compatible with monitor
View Full Code Here

    }
   
    static class DisposeOnClose extends ComponentAdapter implements Serializable{
        public void componentHidden(ComponentEvent e) {
            Window w = (Window)e.getComponent();
            w.dispose();
        }
    }
   
}
View Full Code Here

      ActionListener escapeAction = getEscapeAction(rootPane);
      if (escapeAction != null) {
        escapeAction.actionPerformed(null);
      } else {
        Window window = SwingUtilities.windowForComponent(component);
        window.dispose();
      }
    }

    private ActionListener getEscapeAction(JComponent rootPane) {
      /*
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.