java.awt
Class Window

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.Component sample code for java.awt.Component definition code for java.awt.Component 
      extended by java.awt.Container sample code for java.awt.Container definition code for java.awt.Container 
          extended by java.awt.Window
All Implemented Interfaces:
ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver , MenuContainer sample code for java.awt.MenuContainer definition code for java.awt.MenuContainer , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible
Direct Known Subclasses:
BasicToolBarUI.DragWindow sample code for javax.swing.plaf.basic.BasicToolBarUI.DragWindow definition code for javax.swing.plaf.basic.BasicToolBarUI.DragWindow , Dialog sample code for java.awt.Dialog definition code for java.awt.Dialog , Frame sample code for java.awt.Frame definition code for java.awt.Frame , JWindow sample code for javax.swing.JWindow definition code for javax.swing.JWindow

public class Window
extends Container sample code for java.awt.Container definition code for java.awt.Container
implements Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible

A Window object is a top-level window with no borders and no menubar. The default layout for a window is BorderLayout.

A window must have either a frame, dialog, or another window defined as its owner when it's constructed.

In a multi-screen environment, you can create a Window on a different screen device by constructing the Window with Window(Window, GraphicsConfiguration) sample code for java.awt.Window.Window(java.awt.Window, java.awt.GraphicsConfiguration) definition code for java.awt.Window.Window(java.awt.Window, java.awt.GraphicsConfiguration) . The GraphicsConfiguration object is one of the GraphicsConfiguration objects of the target screen device.

In a virtual device multi-screen environment in which the desktop area could span multiple physical screen devices, the bounds of all configurations are relative to the virtual device coordinate system. The origin of the virtual-coordinate system is at the upper left-hand corner of the primary physical screen. Depending on the location of the primary screen in the virtual device, negative coordinates are possible, as shown in the following figure.

Diagram shows virtual device containing 4 physical screens. Primary physical screen shows coords (0,0), other screen shows (-80,-100).

In such an environment, when calling setLocation, you must pass a virtual coordinate to this method. Similarly, calling getLocationOnScreen on a Window returns virtual device coordinates. Call the getBounds method of a GraphicsConfiguration to find its origin in the virtual coordinate system.

The following code sets the location of a Window at (10, 10) relative to the origin of the physical screen of the corresponding GraphicsConfiguration. If the bounds of the GraphicsConfiguration is not taken into account, the Window location would be set at (10, 10) relative to the virtual-coordinate system and would appear on the primary physical screen, which might be different from the physical screen of the specified GraphicsConfiguration.

        Window w = new Window(Window owner, GraphicsConfiguration gc);
        Rectangle bounds = gc.getBounds();
        w.setLocation(10 + bounds.x, 10 + bounds.y);
 

Note: the location and size of top-level windows (including Windows, Frames, and Dialogs) are under the control of the desktop's window management system. Calls to setLocation, setSize, and setBounds are requests (not directives) which are forwarded to the window management system. Every effort will be made to honor such requests. However, in some cases the window management system may ignore such requests, or modify the requested geometry in order to place and size the Window in a way that more closely matches the desktop settings. Due to the asynchronous nature of native event handling, the results returned by getBounds, getLocation, getLocationOnScreen, and getSize might not reflect the actual geometry of the Window on screen until the last request has been processed. During the processing of subsequent requests these values might change accordingly while the window management system fulfills the requests.

Windows are capable of generating the following WindowEvents: WindowOpened, WindowClosed, WindowGainedFocus, WindowLostFocus.

Since:
JDK1.0
See Also:
WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.WindowEvent , addWindowListener(java.awt.event.WindowListener) sample code for java.awt.Window.addWindowListener(java.awt.event.WindowListener) definition code for java.awt.Window.addWindowListener(java.awt.event.WindowListener) , BorderLayout sample code for java.awt.BorderLayout definition code for java.awt.BorderLayout , Serialized Form

Nested Class Summary
protected  class Window.AccessibleAWTWindow sample code for java.awt.Window.AccessibleAWTWindow definition code for java.awt.Window.AccessibleAWTWindow
          This class implements accessibility support for the Window class.
 
Nested classes/interfaces inherited from class java.awt.Container sample code for java.awt.Container definition code for java.awt.Container
Container.AccessibleAWTContainer sample code for java.awt.Container.AccessibleAWTContainer definition code for java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
Component.AccessibleAWTComponent sample code for java.awt.Component.AccessibleAWTComponent definition code for java.awt.Component.AccessibleAWTComponent , Component.BltBufferStrategy sample code for java.awt.Component.BltBufferStrategy definition code for java.awt.Component.BltBufferStrategy , Component.FlipBufferStrategy sample code for java.awt.Component.FlipBufferStrategy definition code for java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
BOTTOM_ALIGNMENT sample code for java.awt.Component.BOTTOM_ALIGNMENT definition code for java.awt.Component.BOTTOM_ALIGNMENT , CENTER_ALIGNMENT sample code for java.awt.Component.CENTER_ALIGNMENT definition code for java.awt.Component.CENTER_ALIGNMENT , LEFT_ALIGNMENT sample code for java.awt.Component.LEFT_ALIGNMENT definition code for java.awt.Component.LEFT_ALIGNMENT , RIGHT_ALIGNMENT sample code for java.awt.Component.RIGHT_ALIGNMENT definition code for java.awt.Component.RIGHT_ALIGNMENT , TOP_ALIGNMENT sample code for java.awt.Component.TOP_ALIGNMENT definition code for java.awt.Component.TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver
ABORT sample code for java.awt.image.ImageObserver.ABORT definition code for java.awt.image.ImageObserver.ABORT , ALLBITS sample code for java.awt.image.ImageObserver.ALLBITS definition code for java.awt.image.ImageObserver.ALLBITS , ERROR sample code for java.awt.image.ImageObserver.ERROR definition code for java.awt.image.ImageObserver.ERROR , FRAMEBITS sample code for java.awt.image.ImageObserver.FRAMEBITS definition code for java.awt.image.ImageObserver.FRAMEBITS , HEIGHT sample code for java.awt.image.ImageObserver.HEIGHT definition code for java.awt.image.ImageObserver.HEIGHT , PROPERTIES sample code for java.awt.image.ImageObserver.PROPERTIES definition code for java.awt.image.ImageObserver.PROPERTIES , SOMEBITS sample code for java.awt.image.ImageObserver.SOMEBITS definition code for java.awt.image.ImageObserver.SOMEBITS , WIDTH sample code for java.awt.image.ImageObserver.WIDTH definition code for java.awt.image.ImageObserver.WIDTH
 
Constructor Summary
Window sample code for java.awt.Window.Window(java.awt.Frame) definition code for java.awt.Window.Window(java.awt.Frame) (Frame sample code for java.awt.Frame definition code for java.awt.Frame  owner)
          Constructs a new invisible window with the specified Frame as its owner.
Window sample code for java.awt.Window.Window(java.awt.Window) definition code for java.awt.Window.Window(java.awt.Window) (Window sample code for java.awt.Window definition code for java.awt.Window  owner)
          Constructs a new invisible window with the specified Window as its owner.
Window sample code for java.awt.Window.Window(java.awt.Window, java.awt.GraphicsConfiguration) definition code for java.awt.Window.Window(java.awt.Window, java.awt.GraphicsConfiguration) (Window sample code for java.awt.Window definition code for java.awt.Window  owner, GraphicsConfiguration sample code for java.awt.GraphicsConfiguration definition code for java.awt.GraphicsConfiguration  gc)
          Constructs a new invisible window with the specified window as its owner and a GraphicsConfiguration of a screen device.
 
Method Summary
 void addNotify sample code for java.awt.Window.addNotify() definition code for java.awt.Window.addNotify() ()
          Makes this Window displayable by creating the connection to its native screen resource.
 void addPropertyChangeListener sample code for java.awt.Window.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Window.addPropertyChangeListener(java.beans.PropertyChangeListener) (PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
          Adds a PropertyChangeListener to the listener list.
 void addPropertyChangeListener sample code for java.awt.Window.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Window.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) (String sample code for java.lang.String definition code for java.lang.String  propertyName, PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
          Adds a PropertyChangeListener to the listener list for a specific property.
 void addWindowFocusListener sample code for java.awt.Window.addWindowFocusListener(java.awt.event.WindowFocusListener) definition code for java.awt.Window.addWindowFocusListener(java.awt.event.WindowFocusListener) (WindowFocusListener sample code for java.awt.event.WindowFocusListener definition code for java.awt.event.WindowFocusListener  l)
          Adds the specified window focus listener to receive window events from this window.
 void addWindowListener sample code for java.awt.Window.addWindowListener(java.awt.event.WindowListener) definition code for java.awt.Window.addWindowListener(java.awt.event.WindowListener) (WindowListener sample code for java.awt.event.WindowListener definition code for java.awt.event.WindowListener  l)
          Adds the specified window listener to receive window events from this window.
 void addWindowStateListener sample code for java.awt.Window.addWindowStateListener(java.awt.event.WindowStateListener) definition code for java.awt.Window.addWindowStateListener(java.awt.event.WindowStateListener) (WindowStateListener sample code for java.awt.event.WindowStateListener definition code for java.awt.event.WindowStateListener  l)
          Adds the specified window state listener to receive window events from this window.
 void applyResourceBundle sample code for java.awt.Window.applyResourceBundle(java.util.ResourceBundle) definition code for java.awt.Window.applyResourceBundle(java.util.ResourceBundle) (ResourceBundle sample code for java.util.ResourceBundle definition code for java.util.ResourceBundle  rb)
          Deprecated. As of J2SE 1.4, replaced by Component.applyComponentOrientation sample code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) .
 void applyResourceBundle sample code for java.awt.Window.applyResourceBundle(java.lang.String) definition code for java.awt.Window.applyResourceBundle(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  rbName)
          Deprecated. As of J2SE 1.4, replaced by Component.applyComponentOrientation sample code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) .
 void createBufferStrategy sample code for java.awt.Window.createBufferStrategy(int) definition code for java.awt.Window.createBufferStrategy(int) (int numBuffers)
          Creates a new strategy for multi-buffering on this component.
 void createBufferStrategy sample code for java.awt.Window.createBufferStrategy(int, java.awt.BufferCapabilities) definition code for java.awt.Window.createBufferStrategy(int, java.awt.BufferCapabilities) (int numBuffers, BufferCapabilities sample code for java.awt.BufferCapabilities definition code for java.awt.BufferCapabilities  caps)
          Creates a new strategy for multi-buffering on this component with the required buffer capabilities.
 void dispose sample code for java.awt.Window.dispose() definition code for java.awt.Window.dispose() ()
          Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children.
protected  void finalize sample code for java.awt.Window.finalize() definition code for java.awt.Window.finalize() ()
          Disposes of the input methods and context, and removes this Window from the GUI hierarchy.
 AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext getAccessibleContext sample code for java.awt.Window.getAccessibleContext() definition code for java.awt.Window.getAccessibleContext() ()
          Gets the AccessibleContext associated with this Window.
 BufferStrategy sample code for java.awt.image.BufferStrategy definition code for java.awt.image.BufferStrategy getBufferStrategy sample code for java.awt.Window.getBufferStrategy() definition code for java.awt.Window.getBufferStrategy() ()
           
 boolean getFocusableWindowState sample code for java.awt.Window.getFocusableWindowState() definition code for java.awt.Window.getFocusableWindowState() ()
          Returns whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow.
 Container sample code for java.awt.Container definition code for java.awt.Container getFocusCycleRootAncestor sample code for java.awt.Window.getFocusCycleRootAncestor() definition code for java.awt.Window.getFocusCycleRootAncestor() ()
          Always returns null because Windows have no ancestors; they represent the top of the Component hierarchy.
 Component sample code for java.awt.Component definition code for java.awt.Component getFocusOwner sample code for java.awt.Window.getFocusOwner() definition code for java.awt.Window.getFocusOwner() ()
          Returns the child Component of this Window that has focus if this Window is focused; returns null otherwise.
 Set sample code for java.util.Set definition code for java.util.Set <AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke > getFocusTraversalKeys sample code for java.awt.Window.getFocusTraversalKeys(int) definition code for java.awt.Window.getFocusTraversalKeys(int) (int id)
          Gets a focus traversal key for this Window.
 GraphicsConfiguration sample code for java.awt.GraphicsConfiguration definition code for java.awt.GraphicsConfiguration getGraphicsConfiguration sample code for java.awt.Window.getGraphicsConfiguration() definition code for java.awt.Window.getGraphicsConfiguration() ()
          This method returns the GraphicsConfiguration used by this Window.
 InputContext sample code for java.awt.im.InputContext definition code for java.awt.im.InputContext getInputContext sample code for java.awt.Window.getInputContext() definition code for java.awt.Window.getInputContext() ()
          Gets the input context for this window.
<T extends EventListener sample code for java.util.EventListener definition code for java.util.EventListener >
T[]
getListeners sample code for java.awt.Window.getListeners(java.lang.Class) definition code for java.awt.Window.getListeners(java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class <T> listenerType)
          Returns an array of all the objects currently registered as FooListeners upon this Window.
 Locale sample code for java.util.Locale definition code for java.util.Locale getLocale sample code for java.awt.Window.getLocale() definition code for java.awt.Window.getLocale() ()
          Gets the Locale object that is associated with this window, if the locale has been set.
 Component sample code for java.awt.Component definition code for java.awt.Component getMostRecentFocusOwner sample code for java.awt.Window.getMostRecentFocusOwner() definition code for java.awt.Window.getMostRecentFocusOwner() ()
          Returns the child Component of this Window that will receive the focus when this Window is focused.
 Window sample code for java.awt.Window definition code for java.awt.Window [] getOwnedWindows sample code for java.awt.Window.getOwnedWindows() definition code for java.awt.Window.getOwnedWindows() ()
          Return an array containing all the windows this window currently owns.
 Window sample code for java.awt.Window definition code for java.awt.Window getOwner sample code for java.awt.Window.getOwner() definition code for java.awt.Window.getOwner() ()
          Returns the owner of this window.
 Toolkit sample code for java.awt.Toolkit definition code for java.awt.Toolkit getToolkit sample code for java.awt.Window.getToolkit() definition code for java.awt.Window.getToolkit() ()
          Returns the toolkit of this frame.
 String sample code for java.lang.String definition code for java.lang.String getWarningString sample code for java.awt.Window.getWarningString() definition code for java.awt.Window.getWarningString() ()
          Gets the warning string that is displayed with this window.
 WindowFocusListener sample code for java.awt.event.WindowFocusListener definition code for java.awt.event.WindowFocusListener [] getWindowFocusListeners sample code for java.awt.Window.getWindowFocusListeners() definition code for java.awt.Window.getWindowFocusListeners() ()
          Returns an array of all the window focus listeners registered on this window.
 WindowListener sample code for java.awt.event.WindowListener definition code for java.awt.event.WindowListener [] getWindowListeners sample code for java.awt.Window.getWindowListeners() definition code for java.awt.Window.getWindowListeners() ()
          Returns an array of all the window listeners registered on this window.
 WindowStateListener sample code for java.awt.event.WindowStateListener definition code for java.awt.event.WindowStateListener [] getWindowStateListeners sample code for java.awt.Window.getWindowStateListeners() definition code for java.awt.Window.getWindowStateListeners() ()
          Returns an array of all the window state listeners registered on this window.
 void hide sample code for java.awt.Window.hide() definition code for java.awt.Window.hide() ()
          Deprecated. As of JDK 5, replaced by Component.setVisible(boolean) sample code for java.awt.Component.setVisible(boolean) definition code for java.awt.Component.setVisible(boolean) .
 boolean isActive sample code for java.awt.Window.isActive() definition code for java.awt.Window.isActive() ()
          Returns whether this Window is active.
 boolean isAlwaysOnTop sample code for java.awt.Window.isAlwaysOnTop() definition code for java.awt.Window.isAlwaysOnTop() ()
          Returns whether this window is an always-on-top window.
 boolean isFocusableWindow sample code for java.awt.Window.isFocusableWindow() definition code for java.awt.Window.isFocusableWindow() ()
          Returns whether this Window can become the focused Window, that is, whether this Window or any of its subcomponents can become the focus owner.
 boolean isFocusCycleRoot sample code for java.awt.Window.isFocusCycleRoot() definition code for java.awt.Window.isFocusCycleRoot() ()
          Always returns true because all Windows must be roots of a focus traversal cycle.
 boolean isFocused sample code for java.awt.Window.isFocused() definition code for java.awt.Window.isFocused() ()
          Returns whether this Window is focused.
 boolean isLocationByPlatform sample code for java.awt.Window.isLocationByPlatform() definition code for java.awt.Window.isLocationByPlatform() ()
          Returns true if this Window will appear at the default location for the native windowing system the next time this Window is made visible.
 boolean isShowing sample code for java.awt.Window.isShowing() definition code for java.awt.Window.isShowing() ()
          Checks if this Window is showing on screen.
 void pack sample code for java.awt.Window.pack() definition code for java.awt.Window.pack() ()
          Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
 boolean postEvent sample code for java.awt.Window.postEvent(java.awt.Event) definition code for java.awt.Window.postEvent(java.awt.Event) (Event sample code for java.awt.Event definition code for java.awt.Event  e)
          Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
protected  void processEvent sample code for java.awt.Window.processEvent(java.awt.AWTEvent) definition code for java.awt.Window.processEvent(java.awt.AWTEvent) (AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.AWTEvent  e)
          Processes events on this window.
protected  void processWindowEvent sample code for java.awt.Window.processWindowEvent(java.awt.event.WindowEvent) definition code for java.awt.Window.processWindowEvent(java.awt.event.WindowEvent) (WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.WindowEvent  e)
          Processes window events occurring on this window by dispatching them to any registered WindowListener objects.
protected  void processWindowFocusEvent sample code for java.awt.Window.processWindowFocusEvent(java.awt.event.WindowEvent) definition code for java.awt.Window.processWindowFocusEvent(java.awt.event.WindowEvent) (WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.WindowEvent  e)
          Processes window focus event occuring on this window by dispatching them to any registered WindowFocusListener objects.
protected  void processWindowStateEvent sample code for java.awt.Window.processWindowStateEvent(java.awt.event.WindowEvent) definition code for java.awt.Window.processWindowStateEvent(java.awt.event.WindowEvent) (WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.WindowEvent  e)
          Processes window state event occuring on this window by dispatching them to any registered WindowStateListener objects.
 void removeWindowFocusListener sample code for java.awt.Window.removeWindowFocusListener(java.awt.event.WindowFocusListener) definition code for java.awt.Window.removeWindowFocusListener(java.awt.event.WindowFocusListener) (WindowFocusListener sample code for java.awt.event.WindowFocusListener definition code for java.awt.event.WindowFocusListener  l)
          Removes the specified window focus listener so that it no longer receives window events from this window.
 void removeWindowListener sample code for java.awt.Window.removeWindowListener(java.awt.event.WindowListener) definition code for java.awt.Window.removeWindowListener(java.awt.event.WindowListener) (WindowListener sample code for java.awt.event.WindowListener definition code for java.awt.event.WindowListener  l)
          Removes the specified window listener so that it no longer receives window events from this window.
 void removeWindowStateListener sample code for java.awt.Window.removeWindowStateListener(java.awt.event.WindowStateListener) definition code for java.awt.Window.removeWindowStateListener(java.awt.event.WindowStateListener) (WindowStateListener sample code for java.awt.event.WindowStateListener definition code for java.awt.event.WindowStateListener  l)
          Removes the specified window state listener so that it no longer receives window events from this window.
 void setAlwaysOnTop sample code for java.awt.Window.setAlwaysOnTop(boolean) definition code for java.awt.Window.setAlwaysOnTop(boolean) (boolean alwaysOnTop)
          Changes the always-on-top window state.
 void setBounds sample code for java.awt.Window.setBounds(int, int, int, int) definition code for java.awt.Window.setBounds(int, int, int, int) (int x, int y, int width, int height)
          Moves and resizes this component.
 void setCursor sample code for java.awt.Window.setCursor(java.awt.Cursor) definition code for java.awt.Window.setCursor(java.awt.Cursor) (Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor  cursor)
          Set the cursor image to a specified cursor.
 void setFocusableWindowState sample code for java.awt.Window.setFocusableWindowState(boolean) definition code for java.awt.Window.setFocusableWindowState(boolean) (boolean focusableWindowState)
          Sets whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow.
 void setFocusCycleRoot sample code for java.awt.Window.setFocusCycleRoot(boolean) definition code for java.awt.Window.setFocusCycleRoot(boolean) (boolean focusCycleRoot)
          Does nothing because Windows must always be roots of a focus traversal cycle.
 void setLocationByPlatform sample code for java.awt.Window.setLocationByPlatform(boolean) definition code for java.awt.Window.setLocationByPlatform(boolean) (boolean locationByPlatform)
          Sets whether this Window should appear at the default location for the native windowing system or at the current location (returned by getLocation) the next time the Window is made visible.
 void setLocationRelativeTo sample code for java.awt.Window.setLocationRelativeTo(java.awt.Component) definition code for java.awt.Window.setLocationRelativeTo(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Sets the location of the window relative to the specified component.
 void show sample code for java.awt.Window.show() definition code for java.awt.Window.show() ()
          Deprecated. As of JDK 5, replaced by Component.setVisible(boolean) sample code for java.awt.Component.setVisible(boolean) definition code for java.awt.Component.setVisible(boolean) .
 void toBack sample code for java.awt.Window.toBack() definition code for java.awt.Window.toBack() ()
          If this Window is visible, sends this Window to the back and may cause it to lose focus or activation if it is the focused or active Window.
 void toFront sample code for java.awt.Window.toFront() definition code for java.awt.Window.toFront() ()
          If this Window is visible, brings this Window to the front and may make it the focused Window.
 
Methods inherited from class java.awt.Container sample code for java.awt.Container definition code for java.awt.Container
add sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component) , add sample code for java.awt.Container.add(java.awt.Component, int) definition code for java.awt.Container.add(java.awt.Component, int) , add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object) , add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) , add sample code for java.awt.Container.add(java.lang.String, java.awt.Component) definition code for java.awt.Container.add(java.lang.String, java.awt.Component) , addContainerListener sample code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) , addImpl sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) , applyComponentOrientation sample code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) , areFocusTraversalKeysSet sample code for java.awt.Container.areFocusTraversalKeysSet(int) definition code for java.awt.Container.areFocusTraversalKeysSet(int) , countComponents sample code for java.awt.Container.countComponents() definition code for java.awt.Container.countComponents() , deliverEvent sample code for java.awt.Container.deliverEvent(java.awt.Event) definition code for java.awt.Container.deliverEvent(java.awt.Event) , doLayout sample code for java.awt.Container.doLayout() definition code for java.awt.Container.doLayout() , findComponentAt sample code for java.awt.Container.findComponentAt(int, int) definition code for java.awt.Container.findComponentAt(int, int) , findComponentAt sample code for java.awt.Container.findComponentAt(java.awt.Point) definition code for java.awt.Container.findComponentAt(java.awt.Point) , getAlignmentX sample code for java.awt.Container.getAlignmentX() definition code for java.awt.Container.getAlignmentX() , getAlignmentY sample code for java.awt.Container.getAlignmentY() definition code for java.awt.Container.getAlignmentY() , getComponent sample code for java.awt.Container.getComponent(int) definition code for java.awt.Container.getComponent(int) , getComponentAt sample code for java.awt.Container.getComponentAt(int, int) definition code for java.awt.Container.getComponentAt(int, int) , getComponentAt sample code for java.awt.Container.getComponentAt(java.awt.Point) definition code for java.awt.Container.getComponentAt(java.awt.Point) , getComponentCount sample code for java.awt.Container.getComponentCount() definition code for java.awt.Container.getComponentCount() , getComponents sample code for java.awt.Container.getComponents() definition code for java.awt.Container.getComponents() , getComponentZOrder sample code for java.awt.Container.getComponentZOrder(java.awt.Component) definition code for java.awt.Container.getComponentZOrder(java.awt.Component) , getContainerListeners sample code for java.awt.Container.getContainerListeners() definition code for java.awt.Container.getContainerListeners() , getFocusTraversalPolicy sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy() , getInsets sample code for java.awt.Container.getInsets() definition code for java.awt.Container.getInsets() , getLayout sample code for java.awt.Container.getLayout() definition code for java.awt.Container.getLayout() , getMaximumSize sample code for java.awt.Container.getMaximumSize() definition code for java.awt.Container.getMaximumSize() , getMinimumSize sample code for java.awt.Container.getMinimumSize() definition code for java.awt.Container.getMinimumSize() , getMousePosition sample code for java.awt.Container.getMousePosition(boolean) definition code for java.awt.Container.getMousePosition(boolean) , getPreferredSize sample code for java.awt.Container.getPreferredSize() definition code for java.awt.Container.getPreferredSize() , insets sample code for java.awt.Container.insets() definition code for java.awt.Container.insets() , invalidate sample code for java.awt.Container.invalidate() definition code for java.awt.Container.invalidate() , isAncestorOf sample code for java.awt.Container.isAncestorOf(java.awt.Component) definition code for java.awt.Container.isAncestorOf(java.awt.Component) , isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Container.isFocusCycleRoot(java.awt.Container) , isFocusTraversalPolicyProvider sample code for java.awt.Container.isFocusTraversalPolicyProvider() definition code for java.awt.Container.isFocusTraversalPolicyProvider() , isFocusTraversalPolicySet sample code for java.awt.Container.isFocusTraversalPolicySet() definition code for java.awt.Container.isFocusTraversalPolicySet() , layout sample code for java.awt.Container.layout() definition code for java.awt.Container.layout() , list sample code for java.awt.Container.list(java.io.PrintStream, int) definition code for java.awt.Container.list(java.io.PrintStream, int) , list sample code for java.awt.Container.list(java.io.PrintWriter, int) definition code for java.awt.Container.list(java.io.PrintWriter, int) , locate sample code for java.awt.Container.locate(int, int) definition code for java.awt.Container.locate(int, int) , minimumSize sample code for java.awt.Container.minimumSize() definition code for java.awt.Container.minimumSize() , paint sample code for java.awt.Container.paint(java.awt.Graphics) definition code for java.awt.Container.paint(java.awt.Graphics) , paintComponents sample code for java.awt.Container.paintComponents(java.awt.Graphics) definition code for java.awt.Container.paintComponents(java.awt.Graphics) , paramString sample code for java.awt.Container.paramString() definition code for java.awt.Container.paramString() , preferredSize sample code for java.awt.Container.preferredSize() definition code for java.awt.Container.preferredSize() , print sample code for java.awt.Container.print(java.awt.Graphics) definition code for java.awt.Container.print(java.awt.Graphics) , printComponents sample code for java.awt.Container.printComponents(java.awt.Graphics) definition code for java.awt.Container.printComponents(java.awt.Graphics) , processContainerEvent sample code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) definition code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) , remove sample code for java.awt.Container.remove(java.awt.Component) definition code for java.awt.Container.remove(java.awt.Component) , remove sample code for java.awt.Container.remove(int) definition code for java.awt.Container.remove(int) , removeAll sample code for java.awt.Container.removeAll() definition code for java.awt.Container.removeAll() , removeContainerListener sample code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) , removeNotify sample code for java.awt.Container.removeNotify() definition code for java.awt.Container.removeNotify() , setComponentZOrder sample code for java.awt.Container.setComponentZOrder(java.awt.Component, int) definition code for java.awt.Container.setComponentZOrder(java.awt.Component, int) , setFocusTraversalKeys sample code for java.awt.Container.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Container.setFocusTraversalKeys(int, java.util.Set) , setFocusTraversalPolicy sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , setFocusTraversalPolicyProvider sample code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) definition code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) , setFont sample code for java.awt.Container.setFont(java.awt.Font) definition code for java.awt.Container.setFont(java.awt.Font) , setLayout sample code for java.awt.Container.setLayout(java.awt.LayoutManager) definition code for java.awt.Container.setLayout(java.awt.LayoutManager) , transferFocusBackward sample code for java.awt.Container.transferFocusBackward() definition code for java.awt.Container.transferFocusBackward() , transferFocusDownCycle sample code for java.awt.Container.transferFocusDownCycle() definition code for java.awt.Container.transferFocusDownCycle() , update sample code for java.awt.Container.update(java.awt.Graphics) definition code for java.awt.Container.update(java.awt.Graphics) , validate sample code for java.awt.Container.validate() definition code for java.awt.Container.validate() , validateTree sample code for java.awt.Container.validateTree() definition code for java.awt.Container.validateTree()
 
Methods inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
action sample code for java.awt.Component.action(java.awt.Event, java.lang.Object) definition code for java.awt.Component.action(java.awt.Event, java.lang.Object) , add sample code for java.awt.Component.add(java.awt.PopupMenu) definition code for java.awt.Component.add(java.awt.PopupMenu) , addComponentListener sample code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) , addFocusListener sample code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) , addHierarchyBoundsListener sample code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , addHierarchyListener sample code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) , addInputMethodListener sample code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) , addKeyListener sample code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) , addMouseListener sample code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) , addMouseMotionListener sample code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) , addMouseWheelListener sample code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) , bounds sample code for java.awt.Component.bounds() definition code for java.awt.Component.bounds() , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , coalesceEvents sample code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) definition code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) , contains sample code for java.awt.Component.contains(int, int) definition code for java.awt.Component.contains(int, int) , contains sample code for java.awt.Component.contains(java.awt.Point) definition code for java.awt.Component.contains(java.awt.Point) , createImage sample code for java.awt.Component.createImage(java.awt.image.ImageProducer) definition code for java.awt.Component.createImage(java.awt.image.ImageProducer) , createImage sample code for java.awt.Component.createImage(int, int) definition code for java.awt.Component.createImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int) definition code for java.awt.Component.createVolatileImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) definition code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) , disable sample code for java.awt.Component.disable() definition code for java.awt.Component.disable() , disableEvents sample code for java.awt.Component.disableEvents(long) definition code for java.awt.Component.disableEvents(long) , dispatchEvent sample code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) , enable sample code for java.awt.Component.enable() definition code for java.awt.Component.enable() , enable sample code for java.awt.Component.enable(boolean) definition code for java.awt.Component.enable(boolean) , enableEvents sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long) , enableInputMethods sample code for java.awt.Component.enableInputMethods(boolean) definition code for java.awt.Component.enableInputMethods(boolean) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, boolean, boolean) definition code for java.awt.Component.firePropertyChange(java.lang.String, boolean, boolean) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) definition code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, char, char) definition code for java.awt.Component.firePropertyChange(java.lang.String, char, char) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, double, double) definition code for java.awt.Component.firePropertyChange(java.lang.String, double, double) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, float, float) definition code for java.awt.Component.firePropertyChange(java.lang.String, float, float) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, int, int) definition code for java.awt.Component.firePropertyChange(java.lang.String, int, int) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, long, long) definition code for java.awt.Component.firePropertyChange(java.lang.String, long, long) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, short, short) definition code for java.awt.Component.firePropertyChange(java.lang.String, short, short) , getBackground sample code for java.awt.Component.getBackground() definition code for java.awt.Component.getBackground() , getBounds sample code for java.awt.Component.getBounds() definition code for java.awt.Component.getBounds() , getBounds sample code for java.awt.Component.getBounds(java.awt.Rectangle) definition code for java.awt.Component.getBounds(java.awt.Rectangle) , getColorModel sample code for java.awt.Component.getColorModel() definition code for java.awt.Component.getColorModel() , getComponentListeners sample code for java.awt.Component.getComponentListeners() definition code for java.awt.Component.getComponentListeners() , getComponentOrientation sample code for java.awt.Component.getComponentOrientation() definition code for java.awt.Component.getComponentOrientation() , getCursor sample code for java.awt.Component.getCursor() definition code for java.awt.Component.getCursor() , getDropTarget sample code for java.awt.Component.getDropTarget() definition code for java.awt.Component.getDropTarget() , getFocusListeners sample code for java.awt.Component.getFocusListeners() definition code for java.awt.Component.getFocusListeners() , getFocusTraversalKeysEnabled sample code for java.awt.Component.getFocusTraversalKeysEnabled() definition code for java.awt.Component.getFocusTraversalKeysEnabled() , getFont sample code for java.awt.Component.getFont() definition code for java.awt.Component.getFont() , getFontMetrics sample code for java.awt.Component.getFontMetrics(java.awt.Font) definition code for java.awt.Component.getFontMetrics(java.awt.Font) , getForeground sample code for java.awt.Component.getForeground() definition code for java.awt.Component.getForeground() , getGraphics sample code for java.awt.Component.getGraphics() definition code for java.awt.Component.getGraphics() , getHeight sample code for java.awt.Component.getHeight() definition code for java.awt.Component.getHeight() , getHierarchyBoundsListeners sample code for java.awt.Component.getHierarchyBoundsListeners() definition code for java.awt.Component.getHierarchyBoundsListeners() , getHierarchyListeners sample code for java.awt.Component.getHierarchyListeners() definition code for java.awt.Component.getHierarchyListeners() , getIgnoreRepaint sample code for java.awt.Component.getIgnoreRepaint() definition code for java.awt.Component.getIgnoreRepaint() , getInputMethodListeners sample code for java.awt.Component.getInputMethodListeners() definition code for java.awt.Component.getInputMethodListeners() , getInputMethodRequests sample code for java.awt.Component.getInputMethodRequests() definition code for java.awt.Component.getInputMethodRequests() , getKeyListeners sample code for java.awt.Component.getKeyListeners() definition code for java.awt.Component.getKeyListeners() , getLocation sample code for java.awt.Component.getLocation() definition code for java.awt.Component.getLocation() , getLocation sample code for java.awt.Component.getLocation(java.awt.Point) definition code for java.awt.Component.getLocation(java.awt.Point) , getLocationOnScreen sample code for java.awt.Component.getLocationOnScreen() definition code for java.awt.Component.getLocationOnScreen() , getMouseListeners sample code for java.awt.Component.getMouseListeners() definition code for java.awt.Component.getMouseListeners() , getMouseMotionListeners sample code for java.awt.Component.getMouseMotionListeners() definition code for java.awt.Component.getMouseMotionListeners() , getMousePosition sample code for java.awt.Component.getMousePosition() definition code for java.awt.Component.getMousePosition() , getMouseWheelListeners sample code for java.awt.Component.getMouseWheelListeners() definition code for java.awt.Component.getMouseWheelListeners() , getName sample code for java.awt.Component.getName() definition code for java.awt.Component.getName() , getParent sample code for java.awt.Component.getParent() definition code for java.awt.Component.getParent() , getPeer sample code for java.awt.Component.getPeer() definition code for java.awt.Component.getPeer() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners() definition code for java.awt.Component.getPropertyChangeListeners() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners(java.lang.String) definition code for java.awt.Component.getPropertyChangeListeners(java.lang.String) , getSize sample code for java.awt.Component.getSize() definition code for java.awt.Component.getSize() , getSize sample code for java.awt.Component.getSize(java.awt.Dimension) definition code for java.awt.Component.getSize(java.awt.Dimension) , getTreeLock sample code for java.awt.Component.getTreeLock() definition code for java.awt.Component.getTreeLock() , getWidth sample code for java.awt.Component.getWidth() definition code for java.awt.Component.getWidth() , getX sample code for java.awt.Component.getX() definition code for java.awt.Component.getX() , getY sample code for java.awt.Component.getY() definition code for java.awt.Component.getY() , gotFocus sample code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) , handleEvent sample code for java.awt.Component.handleEvent(java.awt.Event) definition code for java.awt.Component.handleEvent(java.awt.Event) , hasFocus sample code for java.awt.Component.hasFocus() definition code for java.awt.Component.hasFocus() , imageUpdate sample code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) , inside sample code for java.awt.Component.inside(int, int) definition code for java.awt.Component.inside(int, int) , isBackgroundSet sample code for java.awt.Component.isBackgroundSet() definition code for java.awt.Component.isBackgroundSet() , isCursorSet sample code for java.awt.Component.isCursorSet() definition code for java.awt.Component.isCursorSet() , isDisplayable sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , isDoubleBuffered sample code for java.awt.Component.isDoubleBuffered() definition code for java.awt.Component.isDoubleBuffered() , isEnabled sample code for java.awt.Component.isEnabled() definition code for java.awt.Component.isEnabled() , isFocusable sample code for java.awt.Component.isFocusable() definition code for java.awt.Component.isFocusable() , isFocusOwner sample code for java.awt.Component.isFocusOwner() definition code for java.awt.Component.isFocusOwner() , isFocusTraversable sample code for java.awt.Component.isFocusTraversable() definition code for java.awt.Component.isFocusTraversable() , isFontSet sample code for java.awt.Component.isFontSet() definition code for java.awt.Component.isFontSet() , isForegroundSet sample code for java.awt.Component.isForegroundSet() definition code for java.awt.Component.isForegroundSet() , isLightweight sample code for java.awt.Component.isLightweight() definition code for java.awt.Component.isLightweight() , isMaximumSizeSet sample code for java.awt.Component.isMaximumSizeSet() definition code for java.awt.Component.isMaximumSizeSet() , isMinimumSizeSet sample code for java.awt.Component.isMinimumSizeSet() definition code for java.awt.Component.isMinimumSizeSet() , isOpaque sample code for java.awt.Component.isOpaque() definition code for java.awt.Component.isOpaque() , isPreferredSizeSet sample code for java.awt.Component.isPreferredSizeSet() definition code for java.awt.Component.isPreferredSizeSet() , isValid sample code for java.awt.Component.isValid() definition code for java.awt.Component.isValid() , isVisible sample code for java.awt.Component.isVisible() definition code for java.awt.Component.isVisible() , keyDown sample code for java.awt.Component.keyDown(java.awt.Event, int) definition code for java.awt.Component.keyDown(java.awt.Event, int) , keyUp sample code for java.awt.Component.keyUp(java.awt.Event, int) definition code for java.awt.Component.keyUp(java.awt.Event, int) , list sample code for java.awt.Component.list() definition code for java.awt.Component.list() , list sample code for java.awt.Component.list(java.io.PrintStream) definition code for java.awt.Component.list(java.io.PrintStream) , list sample code for java.awt.Component.list(java.io.PrintWriter) definition code for java.awt.Component.list(java.io.PrintWriter) , location sample code for java.awt.Component.location() definition code for java.awt.Component.location() , lostFocus sample code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) , mouseDown sample code for java.awt.Component.mouseDown(java.awt.Event, int, int) definition code for java.awt.Component.mouseDown(java.awt.Event, int, int) , mouseDrag sample code for java.awt.Component.mouseDrag(java.awt.Event, int, int) definition code for java.awt.Component.mouseDrag(java.awt.Event, int, int) , mouseEnter sample code for java.awt.Component.mouseEnter(java.awt.Event, int, int) definition code for java.awt.Component.mouseEnter(java.awt.Event, int, int) , mouseExit sample code for java.awt.Component.mouseExit(java.awt.Event, int, int) definition code for java.awt.Component.mouseExit(java.awt.Event, int, int) , mouseMove sample code for java.awt.Component.mouseMove(java.awt.Event, int, int) definition code for java.awt.Component.mouseMove(java.awt.Event, int, int) , mouseUp sample code for java.awt.Component.mouseUp(java.awt.Event, int, int) definition code for java.awt.Component.mouseUp(java.awt.Event, int, int) , move sample code for java.awt.Component.move(int, int) definition code for java.awt.Component.move(int, int) , nextFocus sample code for java.awt.Component.nextFocus() definition code for java.awt.Component.nextFocus() , paintAll sample code for java.awt.Component.paintAll(java.awt.Graphics) definition code for java.awt.Component.paintAll(java.awt.Graphics) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , printAll sample code for java.awt.Component.printAll(java.awt.Graphics) definition code for java.awt.Component.printAll(java.awt.Graphics) , processComponentEvent sample code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) definition code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) , processFocusEvent sample code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) definition code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) , processHierarchyBoundsEvent sample code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) , processHierarchyEvent sample code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) , processInputMethodEvent sample code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) definition code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) , processKeyEvent sample code for java.awt.Component.processKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.Component.processKeyEvent(java.awt.event.KeyEvent) , processMouseEvent sample code for java.awt.Component.processMouseEvent(java.awt.event.MouseEvent) definition code for java.awt.Component.processMouseEvent(java.awt.event.MouseEvent) , processMouseMotionEvent sample code for java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent) definition code for java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent) , processMouseWheelEvent sample code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) definition code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) , remove sample code for java.awt.Component.remove(java.awt.MenuComponent) definition code for java.awt.Component.remove(java.awt.MenuComponent) , removeComponentListener sample code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) , removeFocusListener sample code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) , removeHierarchyBoundsListener sample code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , removeHierarchyListener sample code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) , removeInputMethodListener sample code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) , removeKeyListener sample code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) , removeMouseListener sample code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) , removeMouseMotionListener sample code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) , removeMouseWheelListener sample code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , repaint sample code for java.awt.Component.repaint() definition code for java.awt.Component.repaint() , repaint sample code for java.awt.Component.repaint(int, int, int, int) definition code for java.awt.Component.repaint(int, int, int, int) , repaint sample code for java.awt.Component.repaint(long) definition code for java.awt.Component.repaint(long) , repaint sample code for java.awt.Component.repaint(long, int, int, int, int) definition code for java.awt.Component.repaint(long, int, int, int, int) , requestFocus sample code for java.awt.Component.requestFocus() definition code for java.awt.Component.requestFocus() , requestFocus sample code for java.awt.Component.requestFocus(boolean) definition code for java.awt.Component.requestFocus(boolean) , requestFocusInWindow sample code for java.awt.Component.requestFocusInWindow() definition code for java.awt.Component.requestFocusInWindow() , requestFocusInWindow sample code for java.awt.Component.requestFocusInWindow(boolean) definition code for java.awt.Component.requestFocusInWindow(boolean) , reshape sample code for java.awt.Component.reshape(int, int, int, int) definition code for java.awt.Component.reshape(int, int, int, int) , resize sample code for java.awt.Component.resize(java.awt.Dimension) definition code for java.awt.Component.resize(java.awt.Dimension) , resize sample code for java.awt.Component.resize(int, int) definition code for java.awt.Component.resize(int, int) , setBackground sample code for java.awt.Component.setBackground(java.awt.Color) definition code for java.awt.Component.setBackground(java.awt.Color) , setBounds sample code for java.awt.Component.setBounds(java.awt.Rectangle) definition code for java.awt.Component.setBounds(java.awt.Rectangle) , setComponentOrientation sample code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) , setDropTarget sample code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) definition code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) , setEnabled sample code for java.awt.Component.setEnabled(boolean) definition code for java.awt.Component.setEnabled(boolean) , setFocusable sample code for java.awt.Component.setFocusable(boolean) definition code for java.awt.Component.setFocusable(boolean) , setFocusTraversalKeysEnabled sample code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) definition code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) , setForeground sample code for java.awt.Component.setForeground(java.awt.Color) definition code for java.awt.Component.setForeground(java.awt.Color) , setIgnoreRepaint sample code for java.awt.Component.setIgnoreRepaint(boolean) definition code for java.awt.Component.setIgnoreRepaint(boolean) , setLocale sample code for java.awt.Component.setLocale(java.util.Locale) definition code for java.awt.Component.setLocale(java.util.Locale) , setLocation sample code for java.awt.Component.setLocation(int, int) definition code for java.awt.Component.setLocation(int, int) , setLocation sample code for java.awt.Component.setLocation(java.awt.Point) definition code for java.awt.Component.setLocation(java.awt.Point) , setMaximumSize sample code for java.awt.Component.setMaximumSize(java.awt.Dimension) definition code for java.awt.Component.setMaximumSize(java.awt.Dimension) , setMinimumSize sample code for java.awt.Component.setMinimumSize(java.awt.Dimension) definition code for java.awt.Component.setMinimumSize(java.awt.Dimension) , setName sample code for java.awt.Component.setName(java.lang.String) definition code for java.awt.Component.setName(java.lang.String) , setPreferredSize sample code for java.awt.Component.setPreferredSize(java.awt.Dimension) definition code for java.awt.Component.setPreferredSize(java.awt.Dimension) , setSize sample code for java.awt.Component.setSize(java.awt.Dimension) definition code for java.awt.Component.setSize(java.awt.Dimension) , setSize sample code for java.awt.Component.setSize(int, int) definition code for java.awt.Component.setSize(int, int) , setVisible sample code for java.awt.Component.setVisible(boolean) definition code for java.awt.Component.setVisible(boolean) , show sample code for java.awt.Component.show(boolean) definition code for java.awt.Component.show(boolean) , size sample code for java.awt.Component.size() definition code for java.awt.Component.size() , toString sample code for java.awt.Component.toString() definition code for java.awt.Component.toString() , transferFocus sample code for java.awt.Component.transferFocus() definition code for java.awt.Component.transferFocus() , transferFocusUpCycle sample code for java.awt.Component.transferFocusUpCycle() definition code for java.awt.Component.transferFocusUpCycle()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

Window sample code for java.awt.Window(java.awt.Frame) definition code for java.awt.Window(java.awt.Frame)

public Window(Frame sample code for java.awt.Frame definition code for java.awt.Frame  owner)
Constructs a new invisible window with the specified Frame as its owner. The Window will not be focusable unless its owner is showing on the screen.

If there is a security manager, this method first calls the security manager's checkTopLevelWindow method with this as its argument to determine whether or not the window must be displayed with a warning banner.

Parameters:
owner - the Frame to act as owner
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the owner's GraphicsConfiguration is not from a screen device
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if owner is null; this exception is always thrown when GraphicsEnvironment.isHeadless returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , SecurityManager.checkTopLevelWindow(java.lang.Object) sample code for java.lang.SecurityManager.checkTopLevelWindow(java.lang.Object) definition code for java.lang.SecurityManager.checkTopLevelWindow(java.lang.Object) , isShowing() sample code for java.awt.Window.isShowing() definition code for java.awt.Window.isShowing()

Window sample code for java.awt.Window(java.awt.Window) definition code for java.awt.Window(java.awt.Window)

public Window(Window sample code for java.awt.Window definition code for java.awt.Window  owner)
Constructs a new invisible window with the specified Window as its owner. The Window will not be focusable unless its nearest owning Frame or Dialog is showing on the screen.

If there is a security manager, this method first calls the security manager's checkTopLevelWindow method with this as its argument to determine whether or not the window must be displayed with a warning banner.

Parameters:
owner - the Window to act as owner
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the owner's GraphicsConfiguration is not from a screen device
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if owner is null. This exception is always thrown when GraphicsEnvironment.isHeadless() returns true.
Since:
1.2
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , SecurityManager.checkTopLevelWindow(java.lang.Object) sample code for java.lang.SecurityManager.checkTopLevelWindow(java.lang.Object) definition code for java.lang.SecurityManager.checkTopLevelWindow(java.lang.Object) , isShowing() sample code for java.awt.Window.isShowing() definition code for java.awt.Window.isShowing()

Window sample code for java.awt.Window(java.awt.Window, java.awt.GraphicsConfiguration) definition code for java.awt.Window(java.awt.Window, java.awt.GraphicsConfiguration)

public Window(Window sample code for java.awt.Window definition code for java.awt.Window  owner,
              GraphicsConfiguration sample code for java.awt.GraphicsConfiguration definition code for java.awt.GraphicsConfiguration  gc)
Constructs a new invisible window with the specified window as its owner and a GraphicsConfiguration of a screen device. The Window will not be focusable unless its nearest owning Frame or Dialog is showing on the screen.

If there is a security manager, this method first calls the security manager's checkTopLevelWindow method with this as its argument to determine whether or not the window must be displayed with a warning banner.

Parameters:
owner - the window to act as owner
gc - the GraphicsConfiguration of the target screen device; if gc is null, the system default GraphicsConfiguration is assumed
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if owner is null
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if gc is not from a screen device; this exception is always thrown when GraphicsEnvironment.isHeadless returns true
Since:
1.3
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless() , SecurityManager.checkTopLevelWindow(java.lang.Object) sample code for java.lang.SecurityManager.checkTopLevelWindow(java.lang.Object) definition code for java.lang.SecurityManager.checkTopLevelWindow(java.lang.Object) , GraphicsConfiguration.getBounds() sample code for java.awt.GraphicsConfiguration.getBounds() definition code for java.awt.GraphicsConfiguration.getBounds() , isShowing() sample code for java.awt.Window.isShowing() definition code for java.awt.Window.isShowing()
Method Detail

finalize sample code for java.awt.Window.finalize() definition code for java.awt.Window.finalize()

protected void finalize()
                 throws Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
Disposes of the input methods and context, and removes this Window from the GUI hierarchy. Subclasses that override this method should call super.finalize().

Overrides:
finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() in class Object sample code for java.lang.Object definition code for java.lang.Object
Throws:
Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable - the Exception raised by this method

addNotify sample code for java.awt.Window.addNotify() definition code for java.awt.Window.addNotify()

public void addNotify()
Makes this Window displayable by creating the connection to its native screen resource. This method is called internally by the toolkit and should not be called directly by programs.

Overrides:
addNotify sample code for java.awt.Container.addNotify() definition code for java.awt.Container.addNotify() in class Container sample code for java.awt.Container definition code for java.awt.Container
Since:
JDK1.0
See Also:
Component.isDisplayable() sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , Container.removeNotify() sample code for java.awt.Container.removeNotify() definition code for java.awt.Container.removeNotify()

pack sample code for java.awt.Window.pack() definition code for java.awt.Window.pack()

public void pack()
Causes this Window to be sized to fit the preferred size and layouts of its subcomponents. If the window and/or its owner are not yet displayable, both are made displayable before calculating the preferred size. The Window will be validated after the preferredSize is calculated.

See Also:
Component.isDisplayable() sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable()

show sample code for java.awt.Window.show() definition code for java.awt.Window.show()

@Deprecated
public void show()
Deprecated. As of JDK 5, replaced by Component.setVisible(boolean) sample code for java.awt.Component.setVisible(boolean) definition code for java.awt.Component.setVisible(boolean) .

Overrides:
show sample code for java.awt.Component.show() definition code for java.awt.Component.show() in class Component sample code for java.awt.Component definition code for java.awt.Component

hide sample code for java.awt.Window.hide() definition code for java.awt.Window.hide()

@Deprecated
public void hide()
Deprecated. As of JDK 5, replaced by Component.setVisible(boolean) sample code for java.awt.Component.setVisible(boolean) definition code for java.awt.Component.setVisible(boolean) .

Overrides:
hide sample code for java.awt.Component.hide() definition code for java.awt.Component.hide() in class Component sample code for java.awt.Component definition code for java.awt.Component

dispose sample code for java.awt.Window.dispose() definition code for java.awt.Window.dispose()

public void dispose()
Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children. That is, the resources for these Components will be destroyed, any memory they consume will be returned to the OS, and they will be marked as undisplayable.

The Window and its subcomponents can be made displayable again by rebuilding the native resources with a subsequent call to pack or show. The states of the recreated Window and its subcomponents will be identical to the states of these objects at the point where the Window was disposed (not accounting for additional modifications between those actions).

Note: When the last displayable window within the Java virtual machine (VM) is disposed of, the VM may terminate. See AWT Threading Issues for more information.

See Also:
Component.isDisplayable() sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , pack() sample code for java.awt.Window.pack() definition code for java.awt.Window.pack() , show() sample code for java.awt.Window.show() definition code for java.awt.Window.show()

toFront sample code for java.awt.Window.toFront() definition code for java.awt.Window.toFront()

public void toFront()
If this Window is visible, brings this Window to the front and may make it the focused Window.

Places this Window at the top of the stacking order and shows it in front of any other Windows in this VM. No action will take place if this Window is not visible. Some platforms do not allow Windows which own other Windows to appear on top of those owned Windows. Some platforms may not permit this VM to place its Windows above windows of native applications, or Windows of other VMs. This permission may depend on whether a Window in this VM is already focused. Every attempt will be made to move this Window as high as possible in the stacking order; however, developers should not assume that this method will move this Window above all other windows in every situation.

Because of variations in native windowing systems, no guarantees about changes to the focused and active Windows can be made. Developers must never assume that this Window is the focused or active Window until this Window receives a WINDOW_GAINED_FOCUS or WINDOW_ACTIVATED event. On platforms where the top-most window is the focused window, this method will probably focus this Window, if it is not already focused. On platforms where the stacking order does not typically affect the focused window, this method will probably leave the focused and active Windows unchanged.

If this method causes this Window to be focused, and this Window is a Frame or a Dialog, it will also become activated. If this Window is focused, but it is not a Frame or a Dialog, then the first Frame or Dialog that is an owner of this Window will be activated.

See Also:
toBack() sample code for java.awt.Window.toBack() definition code for java.awt.Window.toBack()

toBack sample code for java.awt.Window.toBack() definition code for java.awt.Window.toBack()

public void toBack()
If this Window is visible, sends this Window to the back and may cause it to lose focus or activation if it is the focused or active Window.

Places this Window at the bottom of the stacking order and shows it behind any other Windows in this VM. No action will take place is this Window is not visible. Some platforms do not allow Windows which are owned by other Windows to appear below their owners. Every attempt will be made to move this Window as low as possible in the stacking order; however, developers should not assume that this method will move this Window below all other windows in every situation.

Because of variations in native windowing systems, no guarantees about changes to the focused and active Windows can be made. Developers must never assume that this Window is no longer the focused or active Window until this Window receives a WINDOW_LOST_FOCUS or WINDOW_DEACTIVATED event. On platforms where the top-most window is the focused window, this method will probably cause this Window to lose focus. In that case, the next highest, focusable Window in this VM will receive focus. On platforms where the stacking order does not typically affect the focused window, this method will probably leave the focused and active Windows unchanged.

See Also:
toFront() sample code for java.awt.Window.toFront() definition code for java.awt.Window.toFront()

getToolkit sample code for java.awt.Window.getToolkit() definition code for java.awt.Window.getToolkit()

public Toolkit sample code for java.awt.Toolkit definition code for java.awt.Toolkit  getToolkit()
Returns the toolkit of this frame.

Overrides:
getToolkit sample code for java.awt.Component.getToolkit() definition code for java.awt.Component.getToolkit() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
the toolkit of this window.
See Also:
Toolkit sample code for java.awt.Toolkit definition code for java.awt.Toolkit , Toolkit.getDefaultToolkit() sample code for java.awt.Toolkit.getDefaultToolkit() definition code for java.awt.Toolkit.getDefaultToolkit() , Component.getToolkit() sample code for java.awt.Component.getToolkit() definition code for java.awt.Component.getToolkit()

getWarningString sample code for java.awt.Window.getWarningString() definition code for java.awt.Window.getWarningString()

public final String sample code for java.lang.String definition code for java.lang.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 checkTopLevelWindow method returns false when this window is passed to it as an argument.

If the window is secure, then getWarningString returns null. If the window is insecure, this method checks for the system property awt.appletWarning and returns the string value of that property.

Returns:
the warning string for this window.
See Also:
SecurityManager.checkTopLevelWindow(java.lang.Object) sample code for java.lang.SecurityManager.checkTopLevelWindow(java.lang.Object) definition code for java.lang.SecurityManager.checkTopLevelWindow(java.lang.Object)

getLocale sample code for java.awt.Window.getLocale() definition code for java.awt.Window.getLocale()

public Locale sample code for java.util.Locale definition code for java.util.Locale  getLocale()
Gets the Locale object that is associated with this window, if the locale has been set. If no locale has been set, then the default locale is returned.

Overrides:
getLocale sample code for java.awt.Component.getLocale() definition code for java.awt.Component.getLocale() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
the locale that is set for this window.
Since:
JDK1.1
See Also:
Locale sample code for java.util.Locale definition code for java.util.Locale

getInputContext sample code for java.awt.Window.getInputContext() definition code for java.awt.Window.getInputContext()

public InputContext sample code for java.awt.im.InputContext definition code for java.awt.im.InputContext  getInputContext()
Gets the input context for this window. A window always has an input context, which is shared by subcomponents unless they create and set their own.

Overrides:
getInputContext sample code for java.awt.Component.getInputContext() definition code for java.awt.Component.getInputContext() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
the input context used by this component; null if no context can be determined
Since:
1.2
See Also:
Component.getInputContext() sample code for java.awt.Component.getInputContext() definition code for java.awt.Component.getInputContext()

setCursor sample code for java.awt.Window.setCursor(java.awt.Cursor) definition code for java.awt.Window.setCursor(java.awt.Cursor)

public void setCursor(Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor  cursor)
Set the cursor image to a specified cursor.

Overrides:
setCursor sample code for java.awt.Component.setCursor(java.awt.Cursor) definition code for java.awt.Component.setCursor(java.awt.Cursor) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
cursor - One of the constants defined by the Cursor class. If this parameter is null then the cursor for this window will be set to the type Cursor.DEFAULT_CURSOR.
Since:
JDK1.1
See Also:
Component.getCursor() sample code for java.awt.Component.getCursor() definition code for java.awt.Component.getCursor() , Cursor sample code for java.awt.Cursor definition code for java.awt.Cursor

getOwner sample code for java.awt.Window.getOwner() definition code for java.awt.Window.getOwner()

public Window sample code for java.awt.Window definition code for java.awt.Window  getOwner()
Returns the owner of this window.

Since:
1.2

getOwnedWindows sample code for java.awt.Window.getOwnedWindows() definition code for java.awt.Window.getOwnedWindows()

public Window sample code for java.awt.Window definition code for java.awt.Window [] getOwnedWindows()
Return an array containing all the windows this window currently owns.

Since:
1.2

addWindowListener sample code for java.awt.Window.addWindowListener(java.awt.event.WindowListener) definition code for java.awt.Window.addWindowListener(java.awt.event.WindowListener)

public void addWindowListener(WindowListener sample code for java.awt.event.WindowListener definition code for java.awt.event.WindowListener  l)
Adds the specified window listener to receive window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window listener
See Also:
removeWindowListener(java.awt.event.WindowListener) sample code for java.awt.Window.removeWindowListener(java.awt.event.WindowListener) definition code for java.awt.Window.removeWindowListener(java.awt.event.WindowListener) , getWindowListeners() sample code for java.awt.Window.getWindowListeners() definition code for java.awt.Window.getWindowListeners()

addWindowStateListener sample code for java.awt.Window.addWindowStateListener(java.awt.event.WindowStateListener) definition code for java.awt.Window.addWindowStateListener(java.awt.event.WindowStateListener)

public void addWindowStateListener(WindowStateListener sample code for java.awt.event.WindowStateListener definition code for java.awt.event.WindowStateListener  l)
Adds the specified window state listener to receive window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window state listener
Since:
1.4
See Also:
removeWindowStateListener(java.awt.event.WindowStateListener) sample code for java.awt.Window.removeWindowStateListener(java.awt.event.WindowStateListener) definition code for java.awt.Window.removeWindowStateListener(java.awt.event.WindowStateListener) , getWindowStateListeners() sample code for java.awt.Window.getWindowStateListeners() definition code for java.awt.Window.getWindowStateListeners()

addWindowFocusListener sample code for java.awt.Window.addWindowFocusListener(java.awt.event.WindowFocusListener) definition code for java.awt.Window.addWindowFocusListener(java.awt.event.WindowFocusListener)

public void addWindowFocusListener(WindowFocusListener sample code for java.awt.event.WindowFocusListener definition code for java.awt.event.WindowFocusListener  l)
Adds the specified window focus listener to receive window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window focus listener
See Also:
removeWindowFocusListener(java.awt.event.WindowFocusListener) sample code for java.awt.Window.removeWindowFocusListener(java.awt.event.WindowFocusListener) definition code for java.awt.Window.removeWindowFocusListener(java.awt.event.WindowFocusListener) , getWindowFocusListeners() sample code for java.awt.Window.getWindowFocusListeners() definition code for java.awt.Window.getWindowFocusListeners()

removeWindowListener sample code for java.awt.Window.removeWindowListener(java.awt.event.WindowListener) definition code for java.awt.Window.removeWindowListener(java.awt.event.WindowListener)

public void removeWindowListener(WindowListener sample code for java.awt.event.WindowListener definition code for java.awt.event.WindowListener  l)
Removes the specified window listener so that it no longer receives window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window listener
See Also:
addWindowListener(java.awt.event.WindowListener) sample code for java.awt.Window.addWindowListener(java.awt.event.WindowListener) definition code for java.awt.Window.addWindowListener(java.awt.event.WindowListener) , getWindowListeners() sample code for java.awt.Window.getWindowListeners() definition code for java.awt.Window.getWindowListeners()

removeWindowStateListener sample code for java.awt.Window.removeWindowStateListener(java.awt.event.WindowStateListener) definition code for java.awt.Window.removeWindowStateListener(java.awt.event.WindowStateListener)

public void removeWindowStateListener(WindowStateListener sample code for java.awt.event.WindowStateListener definition code for java.awt.event.WindowStateListener  l)
Removes the specified window state listener so that it no longer receives window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window state listener
Since:
1.4
See Also:
addWindowStateListener(java.awt.event.WindowStateListener) sample code for java.awt.Window.addWindowStateListener(java.awt.event.WindowStateListener) definition code for java.awt.Window.addWindowStateListener(java.awt.event.WindowStateListener) , getWindowStateListeners() sample code for java.awt.Window.getWindowStateListeners() definition code for java.awt.Window.getWindowStateListeners()

removeWindowFocusListener sample code for java.awt.Window.removeWindowFocusListener(java.awt.event.WindowFocusListener) definition code for java.awt.Window.removeWindowFocusListener(java.awt.event.WindowFocusListener)

public void removeWindowFocusListener(WindowFocusListener sample code for java.awt.event.WindowFocusListener definition code for java.awt.event.WindowFocusListener  l)
Removes the specified window focus listener so that it no longer receives window events from this window. If l is null, no exception is thrown and no action is performed.

Parameters:
l - the window focus listener
See Also:
addWindowFocusListener(java.awt.event.WindowFocusListener) sample code for java.awt.Window.addWindowFocusListener(java.awt.event.WindowFocusListener) definition code for java.awt.Window.addWindowFocusListener(java.awt.event.WindowFocusListener) , getWindowFocusListeners() sample code for java.awt.Window.getWindowFocusListeners() definition code for java.awt.Window.getWindowFocusListeners()

getWindowListeners sample code for java.awt.Window.getWindowListeners() definition code for java.awt.Window.getWindowListeners()

public WindowListener sample code for java.awt.event.WindowListener definition code for java.awt.event.WindowListener [] getWindowListeners()
Returns an array of all the window listeners registered on this window.

Returns:
all of this window's WindowListeners or an empty array if no window listeners are currently registered
Since:
1.4
See Also:
addWindowListener(java.awt.event.WindowListener) sample code for java.awt.Window.addWindowListener(java.awt.event.WindowListener) definition code for java.awt.Window.addWindowListener(java.awt.event.WindowListener) , removeWindowListener(java.awt.event.WindowListener) sample code for java.awt.Window.removeWindowListener(java.awt.event.WindowListener) definition code for java.awt.Window.removeWindowListener(java.awt.event.WindowListener)

getWindowFocusListeners sample code for java.awt.Window.getWindowFocusListeners() definition code for java.awt.Window.getWindowFocusListeners()

public WindowFocusListener sample code for java.awt.event.WindowFocusListener definition code for java.awt.event.WindowFocusListener [] getWindowFocusListeners()
Returns an array of all the window focus listeners registered on this window.

Returns:
all of this window's WindowFocusListeners or an empty array if no window focus listeners are currently registered
Since:
1.4
See Also:
addWindowFocusListener(java.awt.event.WindowFocusListener) sample code for java.awt.Window.addWindowFocusListener(java.awt.event.WindowFocusListener) definition code for java.awt.Window.addWindowFocusListener(java.awt.event.WindowFocusListener) , removeWindowFocusListener(java.awt.event.WindowFocusListener) sample code for java.awt.Window.removeWindowFocusListener(java.awt.event.WindowFocusListener) definition code for java.awt.Window.removeWindowFocusListener(java.awt.event.WindowFocusListener)

getWindowStateListeners sample code for java.awt.Window.getWindowStateListeners() definition code for java.awt.Window.getWindowStateListeners()

public WindowStateListener sample code for java.awt.event.WindowStateListener definition code for java.awt.event.WindowStateListener [] getWindowStateListeners()
Returns an array of all the window state listeners registered on this window.

Returns:
all of this window's WindowStateListeners or an empty array if no window state listeners are currently registered
Since:
1.4
See Also:
addWindowStateListener(java.awt.event.WindowStateListener) sample code for java.awt.Window.addWindowStateListener(java.awt.event.WindowStateListener) definition code for java.awt.Window.addWindowStateListener(java.awt.event.WindowStateListener) , removeWindowStateListener(java.awt.event.WindowStateListener) sample code for java.awt.Window.removeWindowStateListener(java.awt.event.WindowStateListener) definition code for java.awt.Window.removeWindowStateListener(java.awt.event.WindowStateListener)

getListeners sample code for java.awt.Window.<T extends java.util.EventListener>getListeners(java.lang.Class<T>) definition code for java.awt.Window.<T extends java.util.EventListener>getListeners(java.lang.Class<T>)

public <T extends EventListener sample code for java.util.EventListener definition code for java.util.EventListener > T[] getListeners(Class sample code for java.lang.Class definition code for java.lang.Class <T> listenerType)
Returns an array of all the objects currently registered as FooListeners upon this Window. FooListeners are registered using the addFooListener method.

You can specify the listenerType argument with a class literal, such as FooListener.class. For example, you can query a Window w for its window listeners with the following code:

WindowListener[] wls = (WindowListener[])(w.getListeners(WindowListener.class));
If no such listeners exist, this method returns an empty array.

Overrides:
getListeners sample code for java.awt.Container.getListeners(java.lang.Class) definition code for java.awt.Container.getListeners(java.lang.Class) in class Container sample code for java.awt.Container definition code for java.awt.Container
Parameters:
listenerType - the type of listeners requested; this parameter should specify an interface that descends from java.util.EventListener
Returns:
an array of all objects registered as FooListeners on this window, or an empty array if no such listeners have been added
Throws:
ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
Since:
1.3
See Also:
getWindowListeners() sample code for java.awt.Window.getWindowListeners() definition code for java.awt.Window.getWindowListeners()

processEvent sample code for java.awt.Window.processEvent(java.awt.AWTEvent) definition code for java.awt.Window.processEvent(java.awt.AWTEvent)

protected void processEvent(AWTEvent sample code for java.awt.AWTEvent definition code for java.awt.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.

Note that if the event parameter is null the behavior is unspecified and may result in an exception.

Overrides:
processEvent sample code for java.awt.Container.processEvent(java.awt.AWTEvent) definition code for java.awt.Container.processEvent(java.awt.AWTEvent) in class Container sample code for java.awt.Container definition code for java.awt.Container
Parameters:
e - the event
See Also:
Component.processComponentEvent(java.awt.event.ComponentEvent) sample code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) definition code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) , Component.processFocusEvent(java.awt.event.FocusEvent) sample code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) definition code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) , Component.processKeyEvent(java.awt.event.KeyEvent) sample code for java.awt.Component.processKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.Component.processKeyEvent(java.awt.event.KeyEvent) , Component.processMouseEvent(java.awt.event.MouseEvent) sample code for java.awt.Component.processMouseEvent(java.awt.event.MouseEvent) definition code for java.awt.Component.processMouseEvent(java.awt.event.MouseEvent) , Component.processMouseMotionEvent(java.awt.event.MouseEvent) sample code for java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent) definition code for java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent) , Component.processInputMethodEvent(java.awt.event.InputMethodEvent) sample code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) definition code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) , Component.processHierarchyEvent(java.awt.event.HierarchyEvent) sample code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) , Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) sample code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) definition code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent)

processWindowEvent sample code for java.awt.Window.processWindowEvent(java.awt.event.WindowEvent) definition code for java.awt.Window.processWindowEvent(java.awt.event.WindowEvent)

protected void processWindowEvent(WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.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:

Note that if the event parameter is null the behavior is unspecified and may result in an exception.

Parameters:
e - the window event
See Also:
Component.enableEvents(long) sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long)

processWindowFocusEvent sample code for java.awt.Window.processWindowFocusEvent(java.awt.event.WindowEvent) definition code for java.awt.Window.processWindowFocusEvent(java.awt.event.WindowEvent)

protected void processWindowFocusEvent(WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.WindowEvent  e)
Processes window focus event occuring on this window by dispatching them to any registered WindowFocusListener objects. NOTE: this method will not be called unless window focus events are enabled for this window. This happens when one of the following occurs:

Note that if the event parameter is null the behavior is unspecified and may result in an exception.

Parameters:
e - the window focus event
See Also:
Component.enableEvents(long) sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long)

processWindowStateEvent sample code for java.awt.Window.processWindowStateEvent(java.awt.event.WindowEvent) definition code for java.awt.Window.processWindowStateEvent(java.awt.event.WindowEvent)

protected void processWindowStateEvent(WindowEvent sample code for java.awt.event.WindowEvent definition code for java.awt.event.WindowEvent  e)
Processes window state event occuring on this window by dispatching them to any registered WindowStateListener objects. NOTE: this method will not be called unless window state events are enabled for this window. This happens when one of the following occurs:

Note that if the event parameter is null the behavior is unspecified and may result in an exception.

Parameters:
e - the window state event
Since:
1.4
See Also:
Component.enableEvents(long) sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long)

setAlwaysOnTop sample code for java.awt.Window.setAlwaysOnTop(boolean) definition code for java.awt.Window.setAlwaysOnTop(boolean)

public final void setAlwaysOnTop(boolean alwaysOnTop)
                          throws SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException 
Changes the always-on-top window state. An always-on-top window is a window that stays above all other windows except maybe other always-on-top windows. If there are several always-on-top windows the order in which they stay relative to each other is not specified and is platform dependent.

If some other window already is always-on-top then the relative order between these windows is unspecified (depends on platform). No window can be brought to be over always-on-top window except maybe another always-on-top window.

All owned windows of an always-on-top window automatically become always-on-top windows. If a window ceases to be always-on-top its owned windows cease to be always-on-top.

When an always-on-top window is sent toBack sample code for java.awt.Window.toBack() definition code for java.awt.Window.toBack() its always-on-top state is set to false.

This method makes the window always-on-top if alwaysOnTop is true. If the window is visible, this includes bringing window toFront, then "sticking" it to the top-most position. If the window is not visible it does nothing other than setting the always-on-top property. If later the window is shown, it will be always-on-top. If the Window is already always-on-top, this call does nothing.

If alwaysOnTop is false this method changes the state from always-on-top to normal. The window remains top-most but its z-order can be changed in the normal way as for any other window. Does nothing if this Window is not always-on-top. Has no effect on relative z-order of windows if there are no other always-on-top windows.

Note: some platforms might not support always-on-top windows. There is no public API to detect if the platform supports always-on-top at runtime.

If a SecurityManager is installed, the calling thread must be granted the AWTPermission "setWindowAlwaysOnTop" in order to set the value of this property. If this permission is not granted, this method will throw a SecurityException, and the current value of the property will be left unchanged.

Parameters:
alwaysOnTop - new value of always-on-top state of the window
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if the calling thread does not have permission to set the value of always-on-top property
Since:
1.5
See Also:
isAlwaysOnTop() sample code for java.awt.Window.isAlwaysOnTop() definition code for java.awt.Window.isAlwaysOnTop() , toFront() sample code for java.awt.Window.toFront() definition code for java.awt.Window.toFront() , toBack() sample code for java.awt.Window.toBack() definition code for java.awt.Window.toBack() , AWTPermission sample code for java.awt.AWTPermission definition code for java.awt.AWTPermission

isAlwaysOnTop sample code for java.awt.Window.isAlwaysOnTop() definition code for java.awt.Window.isAlwaysOnTop()

public final boolean isAlwaysOnTop()
Returns whether this window is an always-on-top window.

Returns:
true, if the window is in always-on-top state, false otherwise
Since:
1.5
See Also:
setAlwaysOnTop(boolean) sample code for java.awt.Window.setAlwaysOnTop(boolean) definition code for java.awt.Window.setAlwaysOnTop(boolean)

getFocusOwner sample code for java.awt.Window.getFocusOwner() definition code for java.awt.Window.getFocusOwner()

public Component sample code for java.awt.Component definition code for java.awt.Component  getFocusOwner()
Returns the child Component of this Window that has focus if this Window is focused; returns null otherwise.

Returns:
the child Component with focus, or null if this Window is not focused
See Also:
getMostRecentFocusOwner() sample code for java.awt.Window.getMostRecentFocusOwner() definition code for java.awt.Window.getMostRecentFocusOwner() , isFocused() sample code for java.awt.Window.isFocused() definition code for java.awt.Window.isFocused()

getMostRecentFocusOwner sample code for java.awt.Window.getMostRecentFocusOwner() definition code for java.awt.Window.getMostRecentFocusOwner()

public Component sample code for java.awt.Component definition code for java.awt.Component  getMostRecentFocusOwner()
Returns the child Component of this Window that will receive the focus when this Window is focused. If this Window is currently focused, this method returns the same Component as getFocusOwner(). If this Window is not focused, then the child Component that most recently requested focus will be returned. If no child Component has ever requested focus, and this is a focusable Window, then this Window's initial focusable Component is returned. If no child Component has ever requested focus, and this is a non-focusable Window, null is returned.

Returns:
the child Component that will receive focus when this Window is focused
Since:
1.4
See Also:
getFocusOwner() sample code for java.awt.Window.getFocusOwner() definition code for java.awt.Window.getFocusOwner() , isFocused() sample code for java.awt.Window.isFocused() definition code for java.awt.Window.isFocused() , isFocusableWindow() sample code for java.awt.Window.isFocusableWindow() definition code for java.awt.Window.isFocusableWindow()

isActive sample code for java.awt.Window.isActive() definition code for java.awt.Window.isActive()

public boolean isActive()
Returns whether this Window is active. Only a Frame or a Dialog may be active. The native windowing system may denote the active Window or its children with special decorations, such as a highlighted title bar. The active Window is always either the focused Window, or the first Frame or Dialog that is an owner of the focused Window.

Returns:
whether this is the active Window.
Since:
1.4
See Also:
isFocused() sample code for java.awt.Window.isFocused() definition code for java.awt.Window.isFocused()

isFocused sample code for java.awt.Window.isFocused() definition code for java.awt.Window.isFocused()

public boolean isFocused()
Returns whether this Window is focused. If there exists a focus owner, the focused Window is the Window that is, or contains, that focus owner. If there is no focus owner, then no Window is focused.

If the focused Window is a Frame or a Dialog it is also the active Window. Otherwise, the active Window is the first Frame or Dialog that is an owner of the focused Window.

Returns:
whether this is the focused Window.
Since:
1.4
See Also:
isActive() sample code for java.awt.Window.isActive() definition code for java.awt.Window.isActive()

getFocusTraversalKeys sample code for java.awt.Window.getFocusTraversalKeys(int) definition code for java.awt.Window.getFocusTraversalKeys(int)

public Set sample code for java.util.Set definition code for java.util.Set <AWTKeyStroke sample code for java.awt.AWTKeyStroke definition code for java.awt.AWTKeyStroke > getFocusTraversalKeys(int id)
Gets a focus traversal key for this Window. (See setFocusTraversalKeys for a full description of each key.)

If the traversal key has not been explicitly set for this Window, then this Window's parent's traversal key is returned. If the traversal key has not been explicitly set for any of this Window's ancestors, then the current KeyboardFocusManager's default traversal key is returned.

Overrides:
getFocusTraversalKeys sample code for java.awt.Container.getFocusTraversalKeys(int) definition code for java.awt.Container.getFocusTraversalKeys(int) in class Container sample code for java.awt.Container definition code for java.awt.Container
Parameters:
id - one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
Returns:
the AWTKeyStroke for the specified key
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if id is not one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
Since:
1.4
See Also:
Container.setFocusTraversalKeys(int, java.util.Set) sample code for java.awt.Container.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Container.setFocusTraversalKeys(int, java.util.Set) , KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS , KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS , KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS , KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS sample code for java.awt.KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS definition code for java.awt.KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS

setFocusCycleRoot sample code for java.awt.Window.setFocusCycleRoot(boolean) definition code for java.awt.Window.setFocusCycleRoot(boolean)

public final void setFocusCycleRoot(boolean focusCycleRoot)
Does nothing because Windows must always be roots of a focus traversal cycle. The passed-in value is ignored.

Overrides:
setFocusCycleRoot sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean) in class Container sample code for java.awt.Container definition code for java.awt.Container
Parameters:
focusCycleRoot - this value is ignored
Since:
1.4
See Also:
isFocusCycleRoot() sample code for java.awt.Window.isFocusCycleRoot() definition code for java.awt.Window.isFocusCycleRoot() , Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , Container.getFocusTraversalPolicy() sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy()

isFocusCycleRoot sample code for java.awt.Window.isFocusCycleRoot() definition code for java.awt.Window.isFocusCycleRoot()

public final boolean isFocusCycleRoot()
Always returns true because all Windows must be roots of a focus traversal cycle.

Overrides:
isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot() definition code for java.awt.Container.isFocusCycleRoot() in class Container sample code for java.awt.Container definition code for java.awt.Container
Returns:
true
Since:
1.4
See Also:
setFocusCycleRoot(boolean) sample code for java.awt.Window.setFocusCycleRoot(boolean) definition code for java.awt.Window.setFocusCycleRoot(boolean) , Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , Container.getFocusTraversalPolicy() sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy()

getFocusCycleRootAncestor sample code for java.awt.Window.getFocusCycleRootAncestor() definition code for java.awt.Window.getFocusCycleRootAncestor()

public final Container sample code for java.awt.Container definition code for java.awt.Container  getFocusCycleRootAncestor()
Always returns null because Windows have no ancestors; they represent the top of the Component hierarchy.

Overrides:
getFocusCycleRootAncestor sample code for java.awt.Component.getFocusCycleRootAncestor() definition code for java.awt.Component.getFocusCycleRootAncestor() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
null
Since:
1.4
See Also:
Container.isFocusCycleRoot() sample code for java.awt.Container.isFocusCycleRoot() definition code for java.awt.Container.isFocusCycleRoot()

isFocusableWindow sample code for java.awt.Window.isFocusableWindow() definition code for java.awt.Window.isFocusableWindow()

public final boolean isFocusableWindow()
Returns whether this Window can become the focused Window, that is, whether this Window or any of its subcomponents can become the focus owner. For a Frame or Dialog to be focusable, its focusable Window state must be set to true. For a Window which is not a Frame or Dialog to be focusable, its focusable Window state must be set to true, its nearest owning Frame or Dialog must be showing on the screen, and it must contain at least one Component in its focus traversal cycle. If any of these conditions is not met, then neither this Window nor any of its subcomponents can become the focus owner.

Returns:
true if this Window can be the focused Window; false otherwise
Since:
1.4
See Also:
getFocusableWindowState() sample code for java.awt.Window.getFocusableWindowState() definition code for java.awt.Window.getFocusableWindowState() , setFocusableWindowState(boolean) sample code for java.awt.Window.setFocusableWindowState(boolean) definition code for java.awt.Window.setFocusableWindowState(boolean) , isShowing() sample code for java.awt.Window.isShowing() definition code for java.awt.Window.isShowing() , Component.isFocusable() sample code for java.awt.Component.isFocusable() definition code for java.awt.Component.isFocusable()

getFocusableWindowState sample code for java.awt.Window.getFocusableWindowState() definition code for java.awt.Window.getFocusableWindowState()

public boolean getFocusableWindowState()
Returns whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow. If this method returns false, then isFocusableWindow will return false as well. If this method returns true, then isFocusableWindow may return true or false depending upon the other requirements which must be met in order for a Window to be focusable.

By default, all Windows have a focusable Window state of true.

Returns:
whether this Window can be the focused Window
Since:
1.4
See Also:
isFocusableWindow() sample code for java.awt.Window.isFocusableWindow() definition code for java.awt.Window.isFocusableWindow() , setFocusableWindowState(boolean) sample code for java.awt.Window.setFocusableWindowState(boolean) definition code for java.awt.Window.setFocusableWindowState(boolean) , isShowing() sample code for java.awt.Window.isShowing() definition code for java.awt.Window.isShowing() , Component.setFocusable(boolean) sample code for java.awt.Component.setFocusable(boolean) definition code for java.awt.Component.setFocusable(boolean)

setFocusableWindowState sample code for java.awt.Window.setFocusableWindowState(boolean) definition code for java.awt.Window.setFocusableWindowState(boolean)

public void setFocusableWindowState(boolean focusableWindowState)
Sets whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow. If this Window's focusable Window state is set to false, then isFocusableWindow will return false. If this Window's focusable Window state is set to true, then isFocusableWindow may return true or false depending upon the other requirements which must be met in order for a Window to be focusable.

Setting a Window's focusability state to false is the standard mechanism for an application to identify to the AWT a Window which will be used as a floating palette or toolbar, and thus should be a non-focusable Window. Setting the focusability state on a visible Window can have a delayed effect on some platforms — the actual change may happen only when the Window becomes hidden and then visible again. To ensure consistent behavior across platforms, set the Window's focusable state when the WIndow is invisible and then show it.

Parameters:
focusableWindowState - whether this Window can be the focused Window
Since:
1.4
See Also:
isFocusableWindow() sample code for java.awt.Window.isFocusableWindow() definition code for java.awt.Window.isFocusableWindow() , getFocusableWindowState() sample code for java.awt.Window.getFocusableWindowState() definition code for java.awt.Window.getFocusableWindowState() , isShowing() sample code for java.awt.Window.isShowing() definition code for java.awt.Window.isShowing() , Component.setFocusable(boolean) sample code for java.awt.Component.setFocusable(boolean) definition code for java.awt.Component.setFocusable(boolean)

addPropertyChangeListener sample code for java.awt.Window.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Window.addPropertyChangeListener(java.beans.PropertyChangeListener)

public void addPropertyChangeListener(PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all bound properties of this class, including the following: Note that if this Window is inheriting a bound property, then no event will be fired in response to a change in the inherited property.

If listener is null, no exception is thrown and no action is performed.

Overrides:
addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) in class Container sample code for java.awt.Container definition code for java.awt.Container
Parameters:
listener - the PropertyChangeListener to be added
See Also:
Component.removePropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) , addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) sample code for java.awt.Window.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Window.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

addPropertyChangeListener sample code for java.awt.Window.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Window.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

public void addPropertyChangeListener(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                      PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
Adds a PropertyChangeListener to the listener list for a specific property. The specified property may be user-defined, or one of the following: Note that if this Window is inheriting a bound property, then no event will be fired in response to a change in the inherited property.

If listener is null, no exception is thrown and no action is performed.

Overrides:
addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) in class Container sample code for java.awt.Container definition code for java.awt.Container
Parameters:
propertyName - one of the property names listed above
listener - the PropertyChangeListener to be added
See Also:
addPropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.Window.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Window.addPropertyChangeListener(java.beans.PropertyChangeListener) , Component.removePropertyChangeListener(java.beans.PropertyChangeListener) sample code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener)

postEvent sample code for java.awt.Window.postEvent(java.awt.Event) definition code for java.awt.Window.postEvent(java.awt.Event)

@Deprecated
public boolean postEvent(Event sample code for java.awt.Event definition code for java.awt.Event  e)
Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).

Specified by:
postEvent sample code for java.awt.MenuContainer.postEvent(java.awt.Event) definition code for java.awt.MenuContainer.postEvent(java.awt.Event) in interface MenuContainer sample code for java.awt.MenuContainer definition code for java.awt.MenuContainer
Overrides:
postEvent sample code for java.awt.Component.postEvent(java.awt.Event) definition code for java.awt.Component.postEvent(java.awt.Event) in class Component sample code for java.awt.Component definition code for java.awt.Component

isShowing sample code for java.awt.Window.isShowing() definition code for java.awt.Window.isShowing()

public boolean isShowing()
Checks if this Window is showing on screen.

Overrides:
isShowing sample code for java.awt.Component.isShowing() definition code for java.awt.Component.isShowing() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
true if the component is showing, false otherwise
See Also:
Component.setVisible(boolean) sample code for java.awt.Component.setVisible(boolean) definition code for java.awt.Component.setVisible(boolean)

applyResourceBundle sample code for java.awt.Window.applyResourceBundle(java.util.ResourceBundle) definition code for java.awt.Window.applyResourceBundle(java.util.ResourceBundle)

@Deprecated
public void applyResourceBundle(ResourceBundle sample code for java.util.ResourceBundle definition code for java.util.ResourceBundle  rb)
Deprecated. As of J2SE 1.4, replaced by Component.applyComponentOrientation sample code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) .


applyResourceBundle sample code for java.awt.Window.applyResourceBundle(java.lang.String) definition code for java.awt.Window.applyResourceBundle(java.lang.String)

@Deprecated
public void applyResourceBundle(String sample code for java.lang.String definition code for java.lang.String  rbName)
Deprecated. As of J2SE 1.4, replaced by Component.applyComponentOrientation sample code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) .


getAccessibleContext sample code for java.awt.Window.getAccessibleContext() definition code for java.awt.Window.getAccessibleContext()

public AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext  getAccessibleContext()
Gets the AccessibleContext associated with this Window. For windows, the AccessibleContext takes the form of an AccessibleAWTWindow. A new AccessibleAWTWindow instance is created if necessary.

Specified by:
getAccessibleContext sample code for javax.accessibility.Accessible.getAccessibleContext() definition code for javax.accessibility.Accessible.getAccessibleContext() in interface Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible
Overrides:
getAccessibleContext sample code for java.awt.Component.getAccessibleContext() definition code for java.awt.Component.getAccessibleContext() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
an AccessibleAWTWindow that serves as the AccessibleContext of this Window

getGraphicsConfiguration sample code for java.awt.Window.getGraphicsConfiguration() definition code for java.awt.Window.getGraphicsConfiguration()

public GraphicsConfiguration sample code for java.awt.GraphicsConfiguration definition code for java.awt.GraphicsConfiguration  getGraphicsConfiguration()
This method returns the GraphicsConfiguration used by this Window.

Overrides:
getGraphicsConfiguration sample code for java.awt.Component.getGraphicsConfiguration() definition code for java.awt.Component.getGraphicsConfiguration() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
the GraphicsConfiguration used by this Component or null

setLocationRelativeTo sample code for java.awt.Window.setLocationRelativeTo(java.awt.Component) definition code for java.awt.Window.setLocationRelativeTo(java.awt.Component)

public void setLocationRelativeTo(Component sample code for java.awt.Component definition code for java.awt.Component  c)
Sets the location of the window relative to the specified component. If the component is not currently showing, or c is null, the window is centered on the screen. If the bottom of the component is offscreen, the window is placed to the side of the Component that is closest to the center of the screen. So if the Component is on the right part of the screen, the Window is placed to its left, and visa versa.

Parameters:
c - the component in relation to which the window's location is determined
Since:
1.4

createBufferStrategy sample code for java.awt.Window.createBufferStrategy(int) definition code for java.awt.Window.createBufferStrategy(int)

public void createBufferStrategy(int numBuffers)
Creates a new strategy for multi-buffering on this component. Multi-buffering is useful for rendering performance. This method attempts to create the best strategy available with the number of buffers supplied. It will always create a BufferStrategy with that number of buffers. A page-flipping strategy is attempted first, then a blitting strategy using accelerated buffers. Finally, an unaccelerated blitting strategy is used.

Each time this method is called, the existing buffer strategy for this component is discarded.

Parameters:
numBuffers - number of buffers to create
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if numBuffers is less than 1.
IllegalStateException sample code for java.lang.IllegalStateException definition code for java.lang.IllegalStateException - if the component is not displayable
Since:
1.4
See Also:
Component.isDisplayable() sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , getBufferStrategy() sample code for java.awt.Window.getBufferStrategy() definition code for java.awt.Window.getBufferStrategy()

createBufferStrategy sample code for java.awt.Window.createBufferStrategy(int, java.awt.BufferCapabilities) definition code for java.awt.Window.createBufferStrategy(int, java.awt.BufferCapabilities)

public void createBufferStrategy(int numBuffers,
                                 BufferCapabilities sample code for java.awt.BufferCapabilities definition code for java.awt.BufferCapabilities  caps)
                          throws AWTException sample code for java.awt.AWTException definition code for java.awt.AWTException 
Creates a new strategy for multi-buffering on this component with the required buffer capabilities. This is useful, for example, if only accelerated memory or page flipping is desired (as specified by the buffer capabilities).

Each time this method is called, the existing buffer strategy for this component is discarded.

Parameters:
numBuffers - number of buffers to create, including the front buffer
caps - the required capabilities for creating the buffer strategy; cannot be null
Throws:
AWTException sample code for java.awt.AWTException definition code for java.awt.AWTException - if the capabilities supplied could not be supported or met; this may happen, for example, if there is not enough accelerated memory currently available, or if page flipping is specified but not possible.
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if numBuffers is less than 1, or if caps is null
Since:
1.4
See Also:
getBufferStrategy() sample code for java.awt.Window.getBufferStrategy() definition code for java.awt.Window.getBufferStrategy()

getBufferStrategy sample code for java.awt.Window.getBufferStrategy() definition code for java.awt.Window.getBufferStrategy()

public BufferStrategy sample code for java.awt.image.BufferStrategy definition code for java.awt.image.BufferStrategy  getBufferStrategy()
Returns:
the buffer strategy used by this component
Since:
1.4
See Also:
createBufferStrategy(int) sample code for java.awt.Window.createBufferStrategy(int) definition code for java.awt.Window.createBufferStrategy(int)

setLocationByPlatform sample code for java.awt.Window.setLocationByPlatform(boolean) definition code for java.awt.Window.setLocationByPlatform(boolean)

public void setLocationByPlatform(boolean locationByPlatform)
Sets whether this Window should appear at the default location for the native windowing system or at the current location (returned by getLocation) the next time the Window is made visible. This behavior resembles a native window shown without programmatically setting its location. Most windowing systems cascade windows if their locations are not explicitly set. The actual location is determined once the window is shown on the screen.

This behavior can also be enabled by setting the System Property "java.awt.Window.locationByPlatform" to "true", though calls to this method take precedence.

Calls to setVisible, setLocation and setBounds after calling setLocationByPlatform clear this property of the Window.

For example, after the following code is executed:

setLocationByPlatform(true); setVisible(true); boolean flag = isLocationByPlatform();
The window will be shown at platform's default location and flag will be false.

In the following sample:

setLocationByPlatform(true); setLocation(10, 10); boolean flag = isLocationByPlatform(); setVisible(true);
The window will be shown at (10, 10) and flag will be false.

Parameters:
locationByPlatform - true if this Window should appear at the default location, false if at the current location
Throws:
IllegalComponentStateException - if the window is showing on screen and locationByPlatform is true.
Since:
1.5
See Also:
Component.setLocation(int, int) sample code for java.awt.Component.setLocation(int, int) definition code for java.awt.Component.setLocation(int, int) , isShowing() sample code for java.awt.Window.isShowing() definition code for java.awt.Window.isShowing() , Component.setVisible(boolean) sample code for java.awt.Component.setVisible(boolean) definition code for java.awt.Component.setVisible(boolean) , isLocationByPlatform() sample code for java.awt.Window.isLocationByPlatform() definition code for java.awt.Window.isLocationByPlatform() , System.getProperty(String) sample code for java.lang.System.getProperty(java.lang.String) definition code for java.lang.System.getProperty(java.lang.String)

isLocationByPlatform sample code for java.awt.Window.isLocationByPlatform() definition code for java.awt.Window.isLocationByPlatform()

public boolean isLocationByPlatform()
Returns true if this Window will appear at the default location for the native windowing system the next time this Window is made visible. This method always returns false if the Window is showing on the screen.

Returns:
whether this Window will appear at the default location
Since:
1.5
See Also:
setLocationByPlatform(boolean) sample code for java.awt.Window.setLocationByPlatform(boolean) definition code for java.awt.Window.setLocationByPlatform(boolean) , isShowing() sample code for java.awt.Window.isShowing() definition code for java.awt.Window.isShowing()

setBounds sample code for java.awt.Window.setBounds(int, int, int, int) definition code for java.awt.Window.setBounds(int, int, int, int)

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Description copied from class: Component sample code for java.awt.Component.setBounds(int, int, int, int) definition code for java.awt.Component.setBounds(int, int, int, int)
Moves and resizes this component. The new location of the top-left corner is specified by x and y, and the new size is specified by width and height.

Overrides:
setBounds sample code for java.awt.Component.setBounds(int, int, int, int) definition code for java.awt.Component.setBounds(int, int, int, int) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
x - the new x-coordinate of this component
y - the new y-coordinate of this component
width - the new width of this component
height - the new height of this component
Since:
1.5
See Also:
setLocationByPlatform(boolean) sample code for java.awt.Window.setLocationByPlatform(boolean) definition code for java.awt.Window.setLocationByPlatform(boolean) , isLocationByPlatform() sample code for java.awt.Window.isLocationByPlatform() definition code for java.awt.Window.isLocationByPlatform()