Example usage for java.awt.event WindowEvent WINDOW_LAST

List of usage examples for java.awt.event WindowEvent WINDOW_LAST

Introduction

In this page you can find the example usage for java.awt.event WindowEvent WINDOW_LAST.

Prototype

int WINDOW_LAST

To view the source code for java.awt.event WindowEvent WINDOW_LAST.

Click Source Link

Document

The last number in the range of ids used for window events.

Usage

From source file:Main.java

protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_LAST) {
        System.out.println(WindowEvent.WINDOW_LAST);
        dispose();/*  www  . j a va  2 s .c  o  m*/
        System.exit(0);
    }
    super.processWindowEvent(e); // Pass on the event
}