Return to Snippet

Revision: 62276
at February 13, 2013 03:21 by laurenceosx


Initial Code
def closeWindow( aWindow ) {    
    // e.g. close a JFrame window the same way as when the user clicks on the X close window button.
    java.awt.event.WindowEvent wev = new java.awt.event.WindowEvent(aWindow, java.awt.event.WindowEvent.WINDOW_CLOSING);
    java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(wev);
}

Initial URL


Initial Description
close a JFrame window the same way as when the user clicks on the X close window button

Initial Title
groovy close a JFrame window the same way as when the user clicks on the X close window button

Initial Tags
groovy

Initial Language
Groovy