Example usage for java.awt.event WindowEvent WINDOW_FIRST

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

Introduction

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

Prototype

int WINDOW_FIRST

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

Click Source Link

Document

The first 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_FIRST) {
        System.out.println(WindowEvent.WINDOW_FIRST);
        dispose();/*from ww w. j av  a 2  s . com*/
        System.exit(0);
    }
    super.processWindowEvent(e); // Pass on the event
}

From source file:Main.java

protected void processWindowEvent(WindowEvent e) {
    WindowEvent newEvent = new WindowEvent(this, WindowEvent.WINDOW_FIRST, this);

    super.processWindowEvent(e); // Pass on the event
}

From source file:Main.java

protected void processWindowEvent(WindowEvent e) {
    WindowEvent newEvent = new WindowEvent(this, WindowEvent.WINDOW_FIRST, WindowEvent.WINDOW_CLOSED,
            WindowEvent.WINDOW_ACTIVATED);

    super.processWindowEvent(e); // Pass on the event
}

From source file:Main.java

protected void processWindowEvent(WindowEvent e) {
    WindowEvent newEvent = new WindowEvent(this, WindowEvent.WINDOW_FIRST, this, WindowEvent.WINDOW_CLOSED,
            WindowEvent.WINDOW_ACTIVATED);

    super.processWindowEvent(e); // Pass on the event
}