All Packages  Class Hierarchy  This Package  Previous  Next  Index
Class java.awt.Window 
java.lang.Object
|
   +----java.awt.Component
|
           +----java.awt.Container
|
                   +----java.awt.Window
- public class Window - extends Container 
AWindow object is a top-level window with no borders and no menubar. It could be used to implement a pop-up menu. The default layout for a window is BorderLayout. A Window object blocks input to other application windows when it is shown. Windows are capable of generating the following window events: WindowOpened, WindowClosed. 
- See Also: 
- WindowEvent, addWindowListener, BorderLayout 
 
 
 Window(Frame) Window(Frame)
- Constructs a new invisible window. 
 
 
 addNotify() addNotify()
- Creates the Window's peer. 
 addWindowListener(WindowListener) addWindowListener(WindowListener)
- Adds the specified window listener to receive window events from this window. 
 dispose() dispose()
- Disposes of this window. 
 getFocusOwner() getFocusOwner()
- Returns the child component of this Window which has focus if and only if this Window is active. 
 getLocale() getLocale()
- Gets the Localeobject that is associated with this window, if the locale has been set.
 getToolkit() getToolkit()
- Returns the toolkit of this frame. 
 getWarningString() getWarningString()
- Gets the warning string that is displayed with this window. 
 isShowing() isShowing()
- Checks if this Window is showing on screen. 
 pack() pack()
- Causes subcomponents of this window to be laid out at their preferred size. 
 postEvent(Event) postEvent(Event)
- Deprecated. 
 processEvent(AWTEvent) processEvent(AWTEvent)
- Processes events on this window. 
 processWindowEvent(WindowEvent) processWindowEvent(WindowEvent)
- Processes window events occurring on this window by dispatching them to any registered WindowListener objects. 
 removeWindowListener(WindowListener) removeWindowListener(WindowListener)
- Removes the specified window listener so that it no longer receives window events from this window. 
 setCursor(Cursor) setCursor(Cursor)
- Set the cursor image to a predefined cursor. 
 show() show()
- Shows this window, and brings it to the front. 
 toBack() toBack()
- Sends this window to the back. 
 toFront() toFront()
- Brings this window to the front. 
 
 
 Window
 Window 
public Window(Frame parent)
- Constructs a new invisible window. The window is not initially visible. Call the showmethod to cause the window to become visible.
 
- Parameters: 
- parent - the main application frame. 
- See Also: 
- show, setSize 
 
 
 
 addNotify
 addNotify 
public void addNotify()
- Creates the Window's peer. The peer allows us to modify the appearance of the Window without changing its functionality. - Overrides: 
- addNotify in class Container 
 
 pack
 pack 
public void pack()
- Causes subcomponents of this window to be laid out at their preferred size. 
 show
 show 
public void show()
- Shows this window, and brings it to the front. If this window is not yet visible, showmakes it visible. If this window is already visible, then this method brings it to the front.
 
- Overrides: 
- show in class Component 
- See Also: 
- toFront, setVisible 
 
 dispose
 dispose 
public void dispose()
- Disposes of this window. This method must be called to release the resources that are used for the window. 
 toFront
 toFront 
public void toFront()
- Brings this window to the front. Places this window at the top of the stacking order and shows it in front of any other windows. - See Also: 
- toBack 
 
 toBack
 toBack 
public void toBack()
- Sends this window to the back. Places this window at the bottom of the stacking order and makes the corresponding adjustment to other visible windows. - See Also: 
- toFront 
 
 getToolkit
 getToolkit 
public Toolkit getToolkit()
- Returns the toolkit of this frame. - Returns: 
- the toolkit of this window. 
- Overrides: 
- getToolkit in class Component 
- See Also: 
- Toolkit, getDefaultToolkit, getToolkit 
 
 getWarningString
 getWarningString 
public final String getWarningString()
- Gets the warning string that is displayed with this window. If this window is insecure, the warning string is displayed somewhere in the visible area of the window. A window is insecure if there is a security manager, and the security manager's checkTopLevelWindowmethod returnsfalsewhen this window is passed to it as an argument.If the window is secure, then getWarningStringreturnsnull. If the window is insecure, this method checks for the system propertyawt.appletWarningand returns the string value of that property.
 
- Returns: 
- the warning string for this window. 
- See Also: 
- checkTopLevelWindow 
 
 getLocale
 getLocale 
public Locale getLocale()
- Gets the Localeobject that is associated with this window, if the locale has been set. If no locale has been set, then the default locale is returned.
- Returns: 
- the locale that is set for this window. 
- Overrides: 
- getLocale in class Component 
- See Also: 
- Locale 
 
 setCursor
 setCursor 
public synchronized void setCursor(Cursor cursor)
- Set the cursor image to a predefined cursor. - Parameters: 
- cursor- One of the constants defined by the- Cursorclass. If this parameter is null then the cursor for this window will be set to the type Cursor.DEFAULT_CURSOR .
- Overrides: 
- setCursor in class Container 
- See Also: 
- getCursor, Cursor 
 
 addWindowListener
 addWindowListener 
public synchronized void addWindowListener(WindowListener l)
- Adds the specified window listener to receive window events from this window. - Parameters: 
- l - the window listener 
 
 removeWindowListener
 removeWindowListener 
public synchronized void removeWindowListener(WindowListener l)
- Removes the specified window listener so that it no longer receives window events from this window. - Parameters: 
- l - the window listener 
 
 processEvent
 processEvent 
protected void processEvent(AWTEvent e)
- Processes events on this window. If the event is an WindowEvent, it invokes the processWindowEvent method, else it invokes its superclass's processEvent. - Parameters: 
- e - the event 
- Overrides: 
- processEvent in class Container 
 
 processWindowEvent
 processWindowEvent 
protected void processWindowEvent(WindowEvent e)
- Processes window events occurring on this window by dispatching them to any registered WindowListener objects. NOTE: This method will not be called unless window events are enabled for this component; this happens when one of the following occurs: a) A WindowListener object is registered via addWindowListener() b) Window events are enabled via enableEvents() - Parameters: 
- e - the window event 
- See Also: 
- enableEvents 
 
 getFocusOwner
 getFocusOwner 
public Component getFocusOwner()
- Returns the child component of this Window which has focus if and only if this Window is active. - Returns: 
- the component with focus, or null if no children have focus assigned to them. 
 
 postEvent
 postEvent 
public boolean postEvent(Event e)
- Note: postEvent() is deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
- Overrides: 
- postEvent in class Component 
 
 isShowing
 isShowing 
public boolean isShowing()
- Checks if this Window is showing on screen. - Overrides: 
- isShowing in class Component 
- See Also: 
- setVisible 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index
Submit a bug or feature - Version 1.1.8 of Java Platform API Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1995-1999 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.