AWT WindowEvent Class

The object of this class represents the change in state of a window.This low-level event is generated by a Window object when it is opened, closed, activated, deactivated, iconified, or deiconified, or when focus is transfered into or out of the Window.
Following is the declaration for java.awt.event.WindowEvent class:
public class WindowEvent
   extends ComponentEvent
Following are the fields for java.awt.event.WindowEvent class:
static int WINDOW_ACTIVATED  --The window-activated event type.
static int WINDOW_ACTIVATED  --The window-activated event type.
static int WINDOW_CLOSED  -- The window closed event.
static int WINDOW_CLOSED  -- The window closed event.
static int WINDOW_CLOSING  -- The "window is closing" event.
static int WINDOW_CLOSING  -- The "window is closing" event.
static int WINDOW_DEACTIVATED  --	The window-deactivated event type.
static int WINDOW_DEACTIVATED  --	The window-deactivated event type.
static int WINDOW_DEICONIFIED  -- The window deiconified event type.
static int WINDOW_DEICONIFIED  -- The window deiconified event type.
static int WINDOW_FIRST  -- The first number in the range of ids used for window events.
static int WINDOW_FIRST  -- The first number in the range of ids used for window events.
static int WINDOW_GAINED_FOCUS  -- The window-gained-focus event type.
static int WINDOW_GAINED_FOCUS  -- The window-gained-focus event type.
static int WINDOW_ICONIFIED  -- The window iconified event.
static int WINDOW_ICONIFIED  -- The window iconified event.
static int WINDOW_LAST  -- The last number in the range of ids used for window events.
static int WINDOW_LAST  -- The last number in the range of ids used for window events.
static int WINDOW_LOST_FOCUS  -- The window-lost-focus event type.
static int WINDOW_LOST_FOCUS  -- The window-lost-focus event type.
static int WINDOW_OPENED  -- The window opened event.
static int WINDOW_OPENED  -- The window opened event.
static int WINDOW_STATE_CHANGED  -- The window-state-changed event type.
static int WINDOW_STATE_CHANGED  -- The window-state-changed event type.
WindowEvent(Window source, int id) 
Constructs a WindowEvent object.
WindowEvent(Window source, int id, int oldState, int newState) 
Constructs a WindowEvent object with the specified previous and new window states.
WindowEvent(Window source, int id, Window opposite) 
Constructs a WindowEvent object with the specified opposite Window.
WindowEvent(Window source, int id, Window opposite, int oldState, int newState) 
Constructs a WindowEvent object.
int getNewState() 
For WINDOW_STATE_CHANGED events returns the new state of the window.
int getOldState() 
 For WINDOW_STATE_CHANGED events returns the previous state of the window.
Window	getOppositeWindow() 
 Returns the other Window involved in this focus or activation change.
Window	getWindow() 
Returns the originator of the event.
String	paramString() 
 Returns a parameter string identifying this event.
This class inherits methods from the following classes:
java.awt.event.ComponentEvent
java.awt.event.ComponentEvent
java.awt.AWTEvent
java.awt.AWTEvent
java.util.EventObject
java.util.EventObject
java.lang.Object
java.lang.Object

    13 Lectures 
     2 hours 

 EduOLC
 Print
 Add Notes
 Bookmark this page