Overview
Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
Sample
Document
Class java.awt.Window
Inherited members: ShowHide
Deprecated: ShowHide
View: ClientSubclassPackageImplementation
java.awt

Class Window

  • java.lang.Object
    • java.awt.Component
      • java.awt.Container
        • java.awt.Window
  • All Implemented Interfaces:
    java.awt.image.ImageObserver, MenuContainer, java.io.Serializable, javax.accessibility.Accessible
    Direct Known Subclasses:
    Dialog, Frame
    public class Window extends Container implements 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). 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.

    An application may set the size and location of an invisible Window arbitrarily, but the window management system may subsequently change its size and/or location when the Window is made visible. One or more ComponentEvents will be generated to indicate the new geometry.

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

    Since:
    JDK1.0
    See Also:
    WindowEvent, addWindowListener(java.awt.event.WindowListener), BorderLayout, Serialized Form
    • Nested Classes 
      Modifier and Type Class and Description
      Inherited member indicator AccessibleAWTComponent Reveal DetailHide Detail
      protected class AccessibleAWTComponent
      Inner class of Component used to provide default support for accessibility.
      protected class AccessibleAWTComponent
      Inner class of Component used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by component developers.

      The class used to obtain the accessible role for this object.

      Since:
      1.3
      See Also:
      Serialized Form
      Inherited member indicator BaselineResizeBehavior Reveal DetailHide Detail
      static class BaselineResizeBehavior
      Enumeration of the common ways the baseline of a component can change as the size changes.
      static class BaselineResizeBehavior
      Enumeration of the common ways the baseline of a component can change as the size changes. The baseline resize behavior is primarily for layout managers that need to know how the position of the baseline changes as the component size changes. In general the baseline resize behavior will be valid for sizes greater than or equal to the minimum size (the actual minimum size; not a developer specified minimum size). For sizes smaller than the minimum size the baseline may change in a way other than the baseline resize behavior indicates. Similarly, as the size approaches Integer.MAX_VALUE and/or Short.MAX_VALUE the baseline may change in a way other than the baseline resize behavior indicates.
      Since:
      1.6
      See Also:
      Component.getBaselineResizeBehavior(), Component.getBaseline(int,int)
      Inherited member indicator BltBufferStrategy Reveal DetailHide Detail
      protected class BltBufferStrategy
      Inner class for blitting offscreen surfaces to a component.
      protected class BltBufferStrategy
      Inner class for blitting offscreen surfaces to a component.
      Since:
      1.4
      Inherited member indicator FlipBufferStrategy Reveal DetailHide Detail
      protected class FlipBufferStrategy
      Inner class for flipping buffers on a component.
      protected class FlipBufferStrategy
      Inner class for flipping buffers on a component. That component must be a Canvas or Window.
      Since:
      1.4
      See Also:
      Canvas, Window, BufferStrategy
      Inherited member indicator AccessibleAWTContainer Reveal DetailHide Detail
      protected class AccessibleAWTContainer
      Inner class of Container used to provide default support for accessibility.
      protected class AccessibleAWTContainer
      Inner class of Container used to provide default support for accessibility. This class is not meant to be used directly by application developers, but is instead meant only to be subclassed by container developers.

      The class used to obtain the accessible role for this object, as well as implementing many of the methods in the AccessibleContainer interface.

      Since:
      1.3
      See Also:
      Serialized Form
      Ordinary member indicator AccessibleAWTWindow Reveal DetailHide Detail
      protected class AccessibleAWTWindow
      This class implements accessibility support for the Window class.
      protected class AccessibleAWTWindow
      This class implements accessibility support for the Window class. It provides an implementation of the Java Accessibility API appropriate to window user-interface elements.
      Since:
      1.3
      See Also:
      Serialized Form
      Ordinary member indicator Type Reveal DetailHide Detail
      static class Type
      Enumeration of available window types.
      static class Type
      Enumeration of available window types. A window type defines the generic visual appearance and behavior of a top-level window. For example, the type may affect the kind of decorations of a decorated Frame or Dialog instance.

      Some platforms may not fully support a certain window type. Depending on the level of support, some properties of the window type may be disobeyed.

      Since:
      1.7
      See Also:
      getType(), setType(java.awt.Window.Type)
    • Fields 
      Modifier and Type Field and Description
      Inherited member indicator ABORT Reveal DetailHide Detail
      static int ABORT
      This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously was aborted before production was complete.
      public static final int ABORT
      This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously was aborted before production was complete. No more information will become available without further action to trigger another image production sequence. If the ERROR flag was not also set in this image update, then accessing any of the data in the image will restart the production again, probably from the beginning.
      See Also:
      ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int), Constant Field Values
      Inherited member indicator ALLBITS Reveal DetailHide Detail
      static int ALLBITS
      This flag in the infoflags argument to imageUpdate indicates that a static image which was previously drawn is now complete and can be drawn again in its final form.
      public static final int ALLBITS
      This flag in the infoflags argument to imageUpdate indicates that a static image which was previously drawn is now complete and can be drawn again in its final form. The x, y, width, and height arguments to the imageUpdate callback method should be ignored.
      See Also:
      Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver), ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int), Constant Field Values
      Inherited member indicator BOTTOM_ALIGNMENT Reveal DetailHide Detail
      static float BOTTOM_ALIGNMENT
      Ease-of-use constant for getAlignmentY.
      public static final float BOTTOM_ALIGNMENT
      Ease-of-use constant for getAlignmentY. Specifies an alignment to the bottom of the component.
      See Also:
      Component.getAlignmentY(), Constant Field Values
      Inherited member indicator CENTER_ALIGNMENT Reveal DetailHide Detail
      static float CENTER_ALIGNMENT
      Ease-of-use constant for getAlignmentY and getAlignmentX.
      public static final float CENTER_ALIGNMENT
      Ease-of-use constant for getAlignmentY and getAlignmentX. Specifies an alignment to the center of the component
      See Also:
      Component.getAlignmentX(), Component.getAlignmentY(), Constant Field Values
      Inherited member indicator ERROR Reveal DetailHide Detail
      static int ERROR
      This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously has encountered an error.
      public static final int ERROR
      This flag in the infoflags argument to imageUpdate indicates that an image which was being tracked asynchronously has encountered an error. No further information will become available and drawing the image will fail. As a convenience, the ABORT flag will be indicated at the same time to indicate that the image production was aborted.
      See Also:
      ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int), Constant Field Values
      Inherited member indicator FRAMEBITS Reveal DetailHide Detail
      static int FRAMEBITS
      This flag in the infoflags argument to imageUpdate indicates that another complete frame of a multi-frame image which was previously drawn is now available to be drawn again.
      public static final int FRAMEBITS
      This flag in the infoflags argument to imageUpdate indicates that another complete frame of a multi-frame image which was previously drawn is now available to be drawn again. The x, y, width, and height arguments to the imageUpdate callback method should be ignored.
      See Also:
      Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver), ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int), Constant Field Values
      Inherited member indicator HEIGHT Reveal DetailHide Detail
      static int HEIGHT
      This flag in the infoflags argument to imageUpdate indicates that the height of the base image is now available and can be taken from the height argument to the imageUpdate callback method.
      public static final int HEIGHT
      This flag in the infoflags argument to imageUpdate indicates that the height of the base image is now available and can be taken from the height argument to the imageUpdate callback method.
      See Also:
      Image.getHeight(java.awt.image.ImageObserver), ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int), Constant Field Values
      Inherited member indicator LEFT_ALIGNMENT Reveal DetailHide Detail
      static float LEFT_ALIGNMENT
      Ease-of-use constant for getAlignmentX.
      public static final float LEFT_ALIGNMENT
      Ease-of-use constant for getAlignmentX. Specifies an alignment to the left side of the component.
      See Also:
      Component.getAlignmentX(), Constant Field Values
      Inherited member indicator PROPERTIES Reveal DetailHide Detail
      static int PROPERTIES
      This flag in the infoflags argument to imageUpdate indicates that the properties of the image are now available.
      public static final int PROPERTIES
      This flag in the infoflags argument to imageUpdate indicates that the properties of the image are now available.
      See Also:
      Image.getProperty(java.lang.String, java.awt.image.ImageObserver), ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int), Constant Field Values
      Inherited member indicator RIGHT_ALIGNMENT Reveal DetailHide Detail
      static float RIGHT_ALIGNMENT
      Ease-of-use constant for getAlignmentX.
      public static final float RIGHT_ALIGNMENT
      Ease-of-use constant for getAlignmentX. Specifies an alignment to the right side of the component.
      See Also:
      Component.getAlignmentX(), Constant Field Values
      Inherited member indicator SOMEBITS Reveal DetailHide Detail
      static int SOMEBITS
      This flag in the infoflags argument to imageUpdate indicates that more pixels needed for drawing a scaled variation of the image are available.
      public static final int SOMEBITS
      This flag in the infoflags argument to imageUpdate indicates that more pixels needed for drawing a scaled variation of the image are available. The bounding box of the new pixels can be taken from the x, y, width, and height arguments to the imageUpdate callback method.
      See Also:
      Graphics.drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver), ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int), Constant Field Values
      Inherited member indicator TOP_ALIGNMENT Reveal DetailHide Detail
      static float TOP_ALIGNMENT
      Ease-of-use constant for getAlignmentY().
      public static final float TOP_ALIGNMENT
      Ease-of-use constant for getAlignmentY(). Specifies an alignment to the top of the component.
      See Also:
      Component.getAlignmentY(), Constant Field Values
      Inherited member indicator WIDTH Reveal DetailHide Detail
      static int WIDTH
      This flag in the infoflags argument to imageUpdate indicates that the width of the base image is now available and can be taken from the width argument to the imageUpdate callback method.
      public static final int WIDTH
      This flag in the infoflags argument to imageUpdate indicates that the width of the base image is now available and can be taken from the width argument to the imageUpdate callback method.
      See Also:
      Image.getWidth(java.awt.image.ImageObserver), ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int), Constant Field Values
    • Static Methods 
      Modifier and Type Static Method and Description
      Ordinary member indicator getOwnerlessWindows Reveal DetailHide Detail
      static Window[] getOwnerlessWindows()
      Returns an array of all Windows created by this application that have no owner.
      public static Window[] getOwnerlessWindows()
      Returns an array of all Windows created by this application that have no owner. They include Frames and ownerless Dialogs and Windows. If called from an applet, the array includes only the Windows accessible by that applet.

      Warning: this method may return system created windows, such as a print dialog. Applications should not assume the existence of these dialogs, nor should an application assume anything about these dialogs such as component positions, LayoutManagers or serialization.

      Since:
      1.6
      See Also:
      Frame.getFrames(), getWindows()
      Ordinary member indicator getWindows Reveal DetailHide Detail
      static Window[] getWindows()
      Returns an array of all Windows, both owned and ownerless, created by this application.
      public static Window[] getWindows()
      Returns an array of all Windows, both owned and ownerless, created by this application. If called from an applet, the array includes only the Windows accessible by that applet.

      Warning: this method may return system created windows, such as a print dialog. Applications should not assume the existence of these dialogs, nor should an application assume anything about these dialogs such as component positions, LayoutManagers or serialization.

      Since:
      1.6
      See Also:
      Frame.getFrames(), getOwnerlessWindows()
    • Constructors 
      Constructor and Description
      Ordinary member indicator Window Reveal DetailHide Detail
      Window(Frame owner)
      Constructs a new, initially invisible window with the specified Frame as its owner.
      public Window(Frame owner)
      Constructs a new, initially 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 or null if this window has no owner
      Throws:
      java.lang.IllegalArgumentException - if the owner's GraphicsConfiguration is not from a screen device
      HeadlessException - when GraphicsEnvironment.isHeadless returns true
      See Also:
      GraphicsEnvironment.isHeadless(), SecurityManager.checkTopLevelWindow(java.lang.Object), isShowing()
      Ordinary member indicator Window Reveal DetailHide Detail
      Window(Window owner)
      Constructs a new, initially invisible window with the specified Window as its owner.
      public Window(Window owner)
      Constructs a new, initially invisible window with the specified Window as its owner. This 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 or null if this window has no owner
      Throws:
      java.lang.IllegalArgumentException - if the owner's GraphicsConfiguration is not from a screen device
      HeadlessException - when GraphicsEnvironment.isHeadless() returns true
      Since:
      1.2
      See Also:
      GraphicsEnvironment.isHeadless(), SecurityManager.checkTopLevelWindow(java.lang.Object), isShowing()
      Ordinary member indicator Window Reveal DetailHide Detail
      Window(Window owner, GraphicsConfiguration gc)
      Constructs a new, initially invisible window with the specified owner Window and a GraphicsConfiguration of a screen device.
      public Window(Window owner, GraphicsConfiguration gc)
      Constructs a new, initially invisible window with the specified owner Window 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 or null if this window has no owner
      gc - the GraphicsConfiguration of the target screen device; if gc is null, the system default GraphicsConfiguration is assumed
      Throws:
      java.lang.IllegalArgumentException - if gc is not from a screen device
      HeadlessException - when GraphicsEnvironment.isHeadless() returns true
      Since:
      1.3
      See Also:
      GraphicsEnvironment.isHeadless(), SecurityManager.checkTopLevelWindow(java.lang.Object), GraphicsConfiguration.getBounds(), isShowing()
      • Basic Attribute Methods 
        Modifier and Type Method and Description
        Inherited member indicator applyComponentOrientation Reveal DetailHide Detail
        void applyComponentOrientation(ComponentOrientation o)
        Sets the ComponentOrientation property of this container and all components contained within it.
        public void applyComponentOrientation(ComponentOrientation o)
        Description copied from class: Container
        Sets the ComponentOrientation property of this container and all components contained within it.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        Overrides:
        applyComponentOrientation in class Component
        Parameters:
        o - the new component orientation of this container and the components contained within it.
        Throws:
        java.lang.NullPointerException - if orientation is null.
        Since:
        1.4
        See Also:
        Component.setComponentOrientation(java.awt.ComponentOrientation), Component.getComponentOrientation(), Container.invalidate()
        Inherited member indicator disable Reveal DetailHide Detail
        void disable()
        Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
        @Deprecated public void disable()
        Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
        Inherited member indicator enable Reveal DetailHide Detail
        void enable()
        Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
        @Deprecated public void enable()
        Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
        Inherited member indicator enable Reveal DetailHide Detail
        void enable(boolean b)
        Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
        @Deprecated public void enable(boolean b)
        Deprecated. As of JDK version 1.1, replaced by setEnabled(boolean).
        Inherited member indicator enableInputMethods Reveal DetailHide Detail
        void enableInputMethods(boolean enable)
        Enables or disables input method support for this component.
        public void enableInputMethods(boolean enable)
        Description copied from class: Component
        Enables or disables input method support for this component. If input method support is enabled and the component also processes key events, incoming events are offered to the current input method and will only be processed by the component or dispatched to its listeners if the input method does not consume them. By default, input method support is enabled.
        Parameters:
        enable - true to enable, false to disable
        Since:
        1.2
        See Also:
        Component.processKeyEvent(java.awt.event.KeyEvent)
        Overridden member indicator getAccessibleContext Reveal DetailHide Detail
        javax.accessibility.AccessibleContext getAccessibleContext()
        Gets the AccessibleContext associated with this Window.
        public 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 in interface javax.accessibility.Accessible
        Overrides:
        getAccessibleContext in class Component
        Returns:
        an AccessibleAWTWindow that serves as the AccessibleContext of this Window
        Since:
        1.3
        Overridden member indicator getBackground Reveal DetailHide Detail
        Color getBackground()
        Gets the background color of this window.
        public Color getBackground()
        Gets the background color of this window.

        Note that the alpha component of the returned color indicates whether the window is in the non-opaque (per-pixel translucent) mode.

        Overrides:
        getBackground in class Component
        Returns:
        this component's background color
        See Also:
        setBackground(Color), isOpaque(), GraphicsDevice.WindowTranslucency
        Inherited member indicator getColorModel Reveal DetailHide Detail
        java.awt.image.ColorModel getColorModel()
        Gets the instance of ColorModel used to display the component on the output device.
        public java.awt.image.ColorModel getColorModel()
        Description copied from class: Component
        Gets the instance of ColorModel used to display the component on the output device.
        Returns:
        the color model used by this component
        Since:
        JDK1.0
        See Also:
        ColorModel, ComponentPeer.getColorModel(), Toolkit.getColorModel()
        Inherited member indicator getComponentOrientation Reveal DetailHide Detail
        ComponentOrientation getComponentOrientation()
        Retrieves the language-sensitive orientation that is to be used to order the elements or text within this component.
        public ComponentOrientation getComponentOrientation()
        Description copied from class: Component
        Retrieves the language-sensitive orientation that is to be used to order the elements or text within this component. LayoutManager and Component subclasses that wish to respect orientation should call this method to get the component's orientation before performing layout or drawing.
        See Also:
        ComponentOrientation
        Inherited member indicator getCursor Reveal DetailHide Detail
        Cursor getCursor()
        Gets the cursor set in the component.
        public Cursor getCursor()
        Description copied from class: Component
        Gets the cursor set in the component. If the component does not have a cursor set, the cursor of its parent is returned. If no cursor is set in the entire hierarchy, Cursor.DEFAULT_CURSOR is returned.
        Since:
        JDK1.1
        See Also:
        Component.setCursor(java.awt.Cursor)
        Inherited member indicator getFont Reveal DetailHide Detail
        Font getFont()
        Gets the font of this component.
        public Font getFont()
        Description copied from class: Component
        Gets the font of this component.
        Specified by:
        getFont in interface MenuContainer
        Returns:
        this component's font; if a font has not been set for this component, the font of its parent is returned
        Since:
        JDK1.0
        See Also:
        Component.setFont(java.awt.Font)
        Inherited member indicator getForeground Reveal DetailHide Detail
        Color getForeground()
        Gets the foreground color of this component.
        public Color getForeground()
        Description copied from class: Component
        Gets the foreground color of this component.
        Returns:
        this component's foreground color; if this component does not have a foreground color, the foreground color of its parent is returned
        Since:
        JDK1.0
        See Also:
        Component.setForeground(java.awt.Color)
        Overridden member indicator getLocale Reveal DetailHide Detail
        java.util.Locale getLocale()
        Gets the Locale object that is associated with this window, if the locale has been set.
        public 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 in class Component
        Returns:
        the locale that is set for this window.
        Since:
        JDK1.1
        See Also:
        Locale
        Inherited member indicator getName Reveal DetailHide Detail
        java.lang.String getName()
        Gets the name of the component.
        public java.lang.String getName()
        Description copied from class: Component
        Gets the name of the component.
        Returns:
        this component's name
        Since:
        JDK1.1
        See Also:
        Component.setName(java.lang.String)
        Inherited member indicator getParent Reveal DetailHide Detail
        Container getParent()
        Gets the parent of this component.
        public Container getParent()
        Description copied from class: Component
        Gets the parent of this component.
        Returns:
        the parent container of this component
        Since:
        JDK1.0
        Overridden member indicator hide Reveal DetailHide Detail
        void hide()
        Deprecated. As of JDK version 1.5, replaced by setVisible(boolean).
        @Deprecated public void hide()
        Deprecated. As of JDK version 1.5, replaced by setVisible(boolean).
        Hide this Window, its subcomponents, and all of its owned children. The Window and its subcomponents can be made visible again with a call to show.

        Overrides:
        hide in class Component
        See Also:
        show(), dispose()
        Inherited member indicator isBackgroundSet Reveal DetailHide Detail
        boolean isBackgroundSet()
        Returns whether the background color has been explicitly set for this Component.
        public boolean isBackgroundSet()
        Description copied from class: Component
        Returns whether the background color has been explicitly set for this Component. If this method returns false, this Component is inheriting its background color from an ancestor.
        Returns:
        true if the background color has been explicitly set for this Component; false otherwise.
        Since:
        1.4
        Inherited member indicator isCursorSet Reveal DetailHide Detail
        boolean isCursorSet()
        Returns whether the cursor has been explicitly set for this Component.
        public boolean isCursorSet()
        Description copied from class: Component
        Returns whether the cursor has been explicitly set for this Component. If this method returns false, this Component is inheriting its cursor from an ancestor.
        Returns:
        true if the cursor has been explicitly set for this Component; false otherwise.
        Since:
        1.4
        Inherited member indicator isDisplayable Reveal DetailHide Detail
        boolean isDisplayable()
        Determines whether this component is displayable.
        public boolean isDisplayable()
        Description copied from class: Component
        Determines whether this component is displayable. A component is displayable when it is connected to a native screen resource.

        A component is made displayable either when it is added to a displayable containment hierarchy or when its containment hierarchy is made displayable. A containment hierarchy is made displayable when its ancestor window is either packed or made visible.

        A component is made undisplayable either when it is removed from a displayable containment hierarchy or when its containment hierarchy is made undisplayable. A containment hierarchy is made undisplayable when its ancestor window is disposed.

        Returns:
        true if the component is displayable, false otherwise
        Since:
        1.2
        See Also:
        Container.add(Component), pack(), show(), Container.remove(Component), dispose()
        Inherited member indicator isDoubleBuffered Reveal DetailHide Detail
        boolean isDoubleBuffered()
        Returns true if this component is painted to an offscreen image ("buffer") that's copied to the screen later.
        public boolean isDoubleBuffered()
        Description copied from class: Component
        Returns true if this component is painted to an offscreen image ("buffer") that's copied to the screen later. Component subclasses that support double buffering should override this method to return true if double buffering is enabled.
        Returns:
        false by default
        Inherited member indicator isEnabled Reveal DetailHide Detail
        boolean isEnabled()
        Determines whether this component is enabled.
        public boolean isEnabled()
        Description copied from class: Component
        Determines whether this component is enabled. An enabled component can respond to user input and generate events. Components are enabled initially by default. A component may be enabled or disabled by calling its setEnabled method.
        Returns:
        true if the component is enabled, false otherwise
        Since:
        JDK1.0
        See Also:
        Component.setEnabled(boolean)
        Inherited member indicator isFontSet Reveal DetailHide Detail
        boolean isFontSet()
        Returns whether the font has been explicitly set for this Component.
        public boolean isFontSet()
        Description copied from class: Component
        Returns whether the font has been explicitly set for this Component. If this method returns false, this Component is inheriting its font from an ancestor.
        Returns:
        true if the font has been explicitly set for this Component; false otherwise.
        Since:
        1.4
        Inherited member indicator isForegroundSet Reveal DetailHide Detail
        boolean isForegroundSet()
        Returns whether the foreground color has been explicitly set for this Component.
        public boolean isForegroundSet()
        Description copied from class: Component
        Returns whether the foreground color has been explicitly set for this Component. If this method returns false, this Component is inheriting its foreground color from an ancestor.
        Returns:
        true if the foreground color has been explicitly set for this Component; false otherwise.
        Since:
        1.4
        Inherited member indicator isLightweight Reveal DetailHide Detail
        boolean isLightweight()
        A lightweight component doesn't have a native toolkit peer.
        public boolean isLightweight()
        Description copied from class: Component
        A lightweight component doesn't have a native toolkit peer. Subclasses of Component and Container, other than the ones defined in this package like Button or Scrollbar, are lightweight. All of the Swing components are lightweights.

        This method will always return false if this component is not displayable because it is impossible to determine the weight of an undisplayable component.

        Returns:
        true if this component has a lightweight peer; false if it has a native peer or no peer
        Since:
        1.2
        See Also:
        Component.isDisplayable()
        Overridden member indicator isOpaque Reveal DetailHide Detail
        boolean isOpaque()
        Indicates if the window is currently opaque.
        public boolean isOpaque()
        Indicates if the window is currently opaque.

        The method returns false if the background color of the window is not null and the alpha component of the color is less than 1.0f. The method returns true otherwise.

        Overrides:
        isOpaque in class Component
        Returns:
        true if the window is opaque, false otherwise
        Since:
        1.7
        See Also:
        getBackground(), setBackground(Color)
        Overridden member indicator isShowing Reveal DetailHide Detail
        boolean isShowing()
        Checks if this Window is showing on screen.
        public boolean isShowing()
        Checks if this Window is showing on screen.
        Overrides:
        isShowing in class Component
        Returns:
        true if the component is showing, false otherwise
        See Also:
        Component.setVisible(boolean)
        Inherited member indicator isVisible Reveal DetailHide Detail
        boolean isVisible()
        Determines whether this component should be visible when its parent is visible.
        public boolean isVisible()
        Description copied from class: Component
        Determines whether this component should be visible when its parent is visible. Components are initially visible, with the exception of top level components such as Frame objects.
        Returns:
        true if the component is visible, false otherwise
        Since:
        JDK1.0
        See Also:
        Component.setVisible(boolean)
        Overridden member indicator setBackground Reveal DetailHide Detail
        void setBackground(Color bgColor)
        Sets the background color of this window.
        public void setBackground(Color bgColor)
        Sets the background color of this window.

        If the windowing system supports the PERPIXEL_TRANSLUCENT tranclucency, the alpha component of the given background color may effect the mode of operation for this window: it indicates whether this window must be opaque (alpha equals 1.0f) or per-pixel translucent (alpha is less than 1.0f). If the given background color is null, the window is considered completely opaque.

        All the following conditions must be met to enable the per-pixel transparency mode for this window:

        • The PERPIXEL_TRANSLUCENT translucency must be supported by the graphics device where this window is located
        • The window must be undecorated (see Frame.setUndecorated(boolean) and Dialog.setUndecorated(boolean))
        • The window must not be in full-screen mode (see GraphicsDevice.setFullScreenWindow(Window))

        If the alpha component of the requested background color is less than 1.0f, and any of the above conditions are not met, the background color of this window will not change, the alpha component of the given background color will not affect the mode of operation for this window, and either the UnsupportedOperationException or IllegalComponentStateException will be thrown.

        When the window is per-pixel translucent, the drawing sub-system respects the alpha value of each individual pixel. If a pixel gets painted with the alpha color component equal to zero, it becomes visually transparent. If the alpha of the pixel is equal to 1.0f, the pixel is fully opaque. Interim values of the alpha color component make the pixel semi-transparent. In this mode, the background of the window gets painted with the alpha value of the given background color. If the alpha value of the argument of this method is equal to 0, the background is not painted at all.

        The actual level of translucency of a given pixel also depends on window opacity (see setOpacity(float)), as well as the current shape of this window (see setShape(Shape)).

        Note that painting a pixel with the alpha value of 0 may or may not disable the mouse event handling on this pixel. This is a platform-dependent behavior. To make sure the mouse events do not get dispatched to a particular pixel, the pixel must be excluded from the shape of the window.

        Enabling the per-pixel translucency mode may change the graphics configuration of this window due to the native platform requirements.

        Overrides:
        setBackground in class Component
        Parameters:
        bgColor - the color to become this window's background color.
        Throws:
        IllegalComponentStateException - if the alpha value of the given background color is less than 1.0f and the window is decorated
        IllegalComponentStateException - if the alpha value of the given background color is less than 1.0f and the window is in full-screen mode
        java.lang.UnsupportedOperationException - if the alpha value of the given background color is less than 1.0f and PERPIXEL_TRANSLUCENT translucency is not supported
        See Also:
        getBackground(), isOpaque(), setOpacity(float), setShape(Shape), Frame.isUndecorated(), Dialog.isUndecorated(), GraphicsDevice.WindowTranslucency, GraphicsDevice.isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency), GraphicsConfiguration.isTranslucencyCapable()
        Inherited member indicator setComponentOrientation Reveal DetailHide Detail
        void setComponentOrientation(ComponentOrientation o)
        Sets the language-sensitive orientation that is to be used to order the elements or text within this component.
        public void setComponentOrientation(ComponentOrientation o)
        Description copied from class: Component
        Sets the language-sensitive orientation that is to be used to order the elements or text within this component. Language-sensitive LayoutManager and Component subclasses will use this property to determine how to lay out and draw components.

        At construction time, a component's orientation is set to ComponentOrientation.UNKNOWN, indicating that it has not been specified explicitly. The UNKNOWN orientation behaves the same as ComponentOrientation.LEFT_TO_RIGHT.

        To set the orientation of a single component, use this method. To set the orientation of an entire component hierarchy, use applyComponentOrientation.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        See Also:
        ComponentOrientation, Component.invalidate()
        Overridden member indicator setCursor Reveal DetailHide Detail
        void setCursor(Cursor cursor)
        Set the cursor image to a specified cursor.
        public void setCursor(Cursor cursor)
        Set the cursor image to a specified cursor.

        The method may have no visual effect if the Java platform implementation and/or the native system do not support changing the mouse cursor shape.

        Overrides:
        setCursor in class 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(), Cursor
        Inherited member indicator setEnabled Reveal DetailHide Detail
        void setEnabled(boolean b)
        Enables or disables this component, depending on the value of the parameter b.
        public void setEnabled(boolean b)
        Description copied from class: Component
        Enables or disables this component, depending on the value of the parameter b. An enabled component can respond to user input and generate events. Components are enabled initially by default.

        Note: Disabling a lightweight component does not prevent it from receiving MouseEvents.

        Note: Disabling a heavyweight container prevents all components in this container from receiving any input events. But disabling a lightweight container affects only this container.

        Parameters:
        b - If true, this component is enabled; otherwise this component is disabled
        Since:
        JDK1.1
        See Also:
        Component.isEnabled(), Component.isLightweight()
        Inherited member indicator setFont Reveal DetailHide Detail
        void setFont(Font f)
        Sets the font of this container.
        public void setFont(Font f)
        Description copied from class: Container
        Sets the font of this container.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        Overrides:
        setFont in class Component
        Parameters:
        f - The font to become this container's font.
        Since:
        JDK1.0
        See Also:
        Component.getFont(), Container.invalidate()
        Inherited member indicator setForeground Reveal DetailHide Detail
        void setForeground(Color c)
        Sets the foreground color of this component.
        public void setForeground(Color c)
        Description copied from class: Component
        Sets the foreground color of this component.
        Parameters:
        c - the color to become this component's foreground color; if this parameter is null then this component will inherit the foreground color of its parent
        Since:
        JDK1.0
        See Also:
        Component.getForeground()
        Inherited member indicator setLocale Reveal DetailHide Detail
        void setLocale(java.util.Locale l)
        Sets the locale of this component.
        public void setLocale(java.util.Locale l)
        Description copied from class: Component
        Sets the locale of this component. This is a bound property.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        Parameters:
        l - the locale to become this component's locale
        Since:
        JDK1.1
        See Also:
        Component.getLocale(), Component.invalidate()
        Inherited member indicator setName Reveal DetailHide Detail
        void setName(java.lang.String name)
        Sets the name of the component to the specified string.
        public void setName(java.lang.String name)
        Description copied from class: Component
        Sets the name of the component to the specified string.
        Parameters:
        name - the string that is to be this component's name
        Since:
        JDK1.1
        See Also:
        Component.getName()
        Overridden member indicator setVisible Reveal DetailHide Detail
        void setVisible(boolean b)
        Shows or hides this Window depending on the value of parameter b.
        public void setVisible(boolean b)
        Shows or hides this Window depending on the value of parameter b.

        If the method shows the window then the window is also made focused under the following conditions:

        • The Window meets the requirements outlined in the isFocusableWindow() method.
        • The Window's autoRequestFocus property is of the true value.
        • Native windowing system allows the Window to get focused.
        There is an exception for the second condition (the value of the autoRequestFocus property). The property is not taken into account if the window is a modal dialog, which blocks the currently focused window.

        Developers must never assume that the window is the focused or active window until it receives a WINDOW_GAINED_FOCUS or WINDOW_ACTIVATED event.

        Overrides:
        setVisible in class Component
        Parameters:
        b - if true, makes the Window visible, otherwise hides the Window. If the Window and/or its owner are not yet displayable, both are made displayable. The Window will be validated prior to being made visible. If the Window is already visible, this will bring the Window to the front.

        If false, hides this Window, its subcomponents, and all of its owned children. The Window and its subcomponents can be made visible again with a call to #setVisible(true).

        See Also:
        Component.isDisplayable(), Component.setVisible(boolean), toFront(), dispose(), setAutoRequestFocus(boolean), isFocusableWindow()
        Overridden member indicator show Reveal DetailHide Detail
        void show()
        Deprecated. As of JDK version 1.5, replaced by setVisible(boolean).
        @Deprecated public void show()
        Deprecated. As of JDK version 1.5, replaced by setVisible(boolean).
        Makes the Window visible. If the Window and/or its owner are not yet displayable, both are made displayable. The Window will be validated prior to being made visible. If the Window is already visible, this will bring the Window to the front.
        Overrides:
        show in class Component
        See Also:
        Component.isDisplayable(), toFront()
        Inherited member indicator show Reveal DetailHide Detail
        void show(boolean b)
        Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
        @Deprecated public void show(boolean b)
        Deprecated. As of JDK version 1.1, replaced by setVisible(boolean).
      • Event Support Methods 
        Modifier and Type Method and Description
        Inherited member indicator action Reveal DetailHide Detail
        boolean action(Event evt, java.lang.Object what)
        Deprecated. As of JDK version 1.1, should register this component as ActionListener on component which fires action events.
        @Deprecated public boolean action(Event evt, java.lang.Object what)
        Deprecated. As of JDK version 1.1, should register this component as ActionListener on component which fires action events.
        Inherited member indicator coalesceEvents Reveal DetailHide Detail
        protected AWTEvent coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent)
        Potentially coalesce an event being posted with an existing event.
        protected AWTEvent coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent)
        Description copied from class: Component
        Potentially coalesce an event being posted with an existing event. This method is called by EventQueue.postEvent if an event with the same ID as the event to be posted is found in the queue (both events must have this component as their source). This method either returns a coalesced event which replaces the existing event (and the new event is then discarded), or null to indicate that no combining should be done (add the second event to the end of the queue). Either event parameter may be modified and returned, as the other one is discarded unless null is returned.

        This implementation of coalesceEvents coalesces two event types: mouse move (and drag) events, and paint (and update) events. For mouse move events the last event is always returned, causing intermediate moves to be discarded. For paint events, the new event is coalesced into a complex RepaintArea in the peer. The new AWTEvent is always returned.

        Parameters:
        existingEvent - the event already on the EventQueue
        newEvent - the event being posted to the EventQueue
        Returns:
        a coalesced event, or null indicating that no coalescing was done
        Inherited member indicator deliverEvent Reveal DetailHide Detail
        void deliverEvent(Event e)
        Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e)
        @Deprecated public void deliverEvent(Event e)
        Deprecated. As of JDK version 1.1, replaced by dispatchEvent(AWTEvent e)
        Inherited member indicator disableEvents Reveal DetailHide Detail
        protected void disableEvents(long eventsToDisable)
        Disables the events defined by the specified event mask parameter from being delivered to this component.
        protected final void disableEvents(long eventsToDisable)
        Description copied from class: Component
        Disables the events defined by the specified event mask parameter from being delivered to this component.
        Parameters:
        eventsToDisable - the event mask defining the event types
        Since:
        JDK1.1
        See Also:
        Component.enableEvents(long)
        Inherited member indicator dispatchEvent Reveal DetailHide Detail
        void dispatchEvent(AWTEvent e)
        Dispatches an event to this component or one of its sub components.
        public final void dispatchEvent(AWTEvent e)
        Description copied from class: Component
        Dispatches an event to this component or one of its sub components. Calls processEvent before returning for 1.1-style events which have been enabled for the Component.
        Parameters:
        e - the event
        Inherited member indicator enableEvents Reveal DetailHide Detail
        protected void enableEvents(long eventsToEnable)
        Enables the events defined by the specified event mask parameter to be delivered to this component.
        protected final void enableEvents(long eventsToEnable)
        Description copied from class: Component
        Enables the events defined by the specified event mask parameter to be delivered to this component.

        Event types are automatically enabled when a listener for that event type is added to the component.

        This method only needs to be invoked by subclasses of Component which desire to have the specified event types delivered to processEvent regardless of whether or not a listener is registered.

        Parameters:
        eventsToEnable - the event mask defining the event types
        Since:
        JDK1.1
        See Also:
        Component.processEvent(java.awt.AWTEvent), Component.disableEvents(long), AWTEvent
        Inherited member indicator firePropertyChange Reveal DetailHide Detail
        protected void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
        Support for reporting bound property changes for boolean properties.
        protected void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
        Description copied from class: Component
        Support for reporting bound property changes for boolean properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.
        Parameters:
        propertyName - the property whose value has changed
        oldValue - the property's previous value
        newValue - the property's new value
        Since:
        1.4
        Inherited member indicator firePropertyChange Reveal DetailHide Detail
        void firePropertyChange(java.lang.String propertyName, byte oldValue, byte newValue)
        Reports a bound property change.
        public void firePropertyChange(java.lang.String propertyName, byte oldValue, byte newValue)
        Description copied from class: Component
        Reports a bound property change.
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a byte)
        newValue - the new value of the property (as a byte)
        Since:
        1.5
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
        Inherited member indicator firePropertyChange Reveal DetailHide Detail
        void firePropertyChange(java.lang.String propertyName, char oldValue, char newValue)
        Reports a bound property change.
        public void firePropertyChange(java.lang.String propertyName, char oldValue, char newValue)
        Description copied from class: Component
        Reports a bound property change.
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a char)
        newValue - the new value of the property (as a char)
        Since:
        1.5
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
        Inherited member indicator firePropertyChange Reveal DetailHide Detail
        void firePropertyChange(java.lang.String propertyName, double oldValue, double newValue)
        Reports a bound property change.
        public void firePropertyChange(java.lang.String propertyName, double oldValue, double newValue)
        Description copied from class: Component
        Reports a bound property change.
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a double)
        newValue - the new value of the property (as a double)
        Since:
        1.5
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
        Inherited member indicator firePropertyChange Reveal DetailHide Detail
        void firePropertyChange(java.lang.String propertyName, float oldValue, float newValue)
        Reports a bound property change.
        public void firePropertyChange(java.lang.String propertyName, float oldValue, float newValue)
        Description copied from class: Component
        Reports a bound property change.
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a float)
        newValue - the new value of the property (as a float)
        Since:
        1.5
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
        Inherited member indicator firePropertyChange Reveal DetailHide Detail
        protected void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
        Support for reporting bound property changes for integer properties.
        protected void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
        Description copied from class: Component
        Support for reporting bound property changes for integer properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.
        Parameters:
        propertyName - the property whose value has changed
        oldValue - the property's previous value
        newValue - the property's new value
        Since:
        1.4
        Inherited member indicator firePropertyChange Reveal DetailHide Detail
        void firePropertyChange(java.lang.String propertyName, long oldValue, long newValue)
        Reports a bound property change.
        public void firePropertyChange(java.lang.String propertyName, long oldValue, long newValue)
        Description copied from class: Component
        Reports a bound property change.
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a long)
        newValue - the new value of the property (as a long)
        Since:
        1.5
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
        Inherited member indicator firePropertyChange Reveal DetailHide Detail
        protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
        Support for reporting bound property changes for Object properties.
        protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
        Description copied from class: Component
        Support for reporting bound property changes for Object properties. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.
        Parameters:
        propertyName - the property whose value has changed
        oldValue - the property's previous value
        newValue - the property's new value
        Inherited member indicator firePropertyChange Reveal DetailHide Detail
        void firePropertyChange(java.lang.String propertyName, short oldValue, short newValue)
        Reports a bound property change.
        public void firePropertyChange(java.lang.String propertyName, short oldValue, short newValue)
        Description copied from class: Component
        Reports a bound property change.
        Parameters:
        propertyName - the programmatic name of the property that was changed
        oldValue - the old value of the property (as a short)
        newValue - the old value of the property (as a short)
        Since:
        1.5
        See Also:
        Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)
        Overridden member indicator getListeners Reveal DetailHide Detail
        <T extends java.util.EventListener> T[] getListeners(java.lang.Class<T> listenerType)
        Returns an array of all the objects currently registered as FooListeners upon this Window.
        public <T extends java.util.EventListener> T[] getListeners(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 in class 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:
        java.lang.ClassCastException - if listenerType doesn't specify a class or interface that implements java.util.EventListener
        java.lang.NullPointerException - if listenerType is null
        Since:
        1.3
        See Also:
        getWindowListeners()
        Inherited member indicator handleEvent Reveal DetailHide Detail
        boolean handleEvent(Event evt)
        Deprecated. As of JDK version 1.1 replaced by processEvent(AWTEvent).
        @Deprecated public boolean handleEvent(Event evt)
        Deprecated. As of JDK version 1.1 replaced by processEvent(AWTEvent).
        Inherited member indicator keyDown Reveal DetailHide Detail
        boolean keyDown(Event evt, int key)
        Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
        @Deprecated public boolean keyDown(Event evt, int key)
        Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
        Inherited member indicator keyUp Reveal DetailHide Detail
        boolean keyUp(Event evt, int key)
        Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
        @Deprecated public boolean keyUp(Event evt, int key)
        Deprecated. As of JDK version 1.1, replaced by processKeyEvent(KeyEvent).
        Inherited member indicator mouseDown Reveal DetailHide Detail
        boolean mouseDown(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        @Deprecated public boolean mouseDown(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        Inherited member indicator mouseDrag Reveal DetailHide Detail
        boolean mouseDrag(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
        @Deprecated public boolean mouseDrag(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
        Inherited member indicator mouseEnter Reveal DetailHide Detail
        boolean mouseEnter(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        @Deprecated public boolean mouseEnter(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        Inherited member indicator mouseExit Reveal DetailHide Detail
        boolean mouseExit(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        @Deprecated public boolean mouseExit(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        Inherited member indicator mouseMove Reveal DetailHide Detail
        boolean mouseMove(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
        @Deprecated public boolean mouseMove(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseMotionEvent(MouseEvent).
        Inherited member indicator mouseUp Reveal DetailHide Detail
        boolean mouseUp(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        @Deprecated public boolean mouseUp(Event evt, int x, int y)
        Deprecated. As of JDK version 1.1, replaced by processMouseEvent(MouseEvent).
        Overridden member indicator postEvent Reveal DetailHide Detail
        boolean postEvent(Event e)
        Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
        @Deprecated public boolean postEvent(Event e)
        Deprecated. As of JDK version 1.1 replaced by dispatchEvent(AWTEvent).
        Inherited member indicator processComponentEvent Reveal DetailHide Detail
        protected void processComponentEvent(ComponentEvent e)
        Processes component events occurring on this component by dispatching them to any registered ComponentListener objects.
        protected void processComponentEvent(ComponentEvent e)
        Description copied from class: Component
        Processes component events occurring on this component by dispatching them to any registered ComponentListener objects.

        This method is not called unless component events are enabled for this component. Component events are enabled when one of the following occurs:

        • A ComponentListener object is registered via addComponentListener.
        • Component events are enabled via enableEvents.

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

        Parameters:
        e - the component event
        Since:
        JDK1.1
        See Also:
        ComponentEvent, ComponentListener, Component.addComponentListener(java.awt.event.ComponentListener), Component.enableEvents(long)
        Inherited member indicator processContainerEvent Reveal DetailHide Detail
        protected void processContainerEvent(ContainerEvent e)
        Processes container events occurring on this container by dispatching them to any registered ContainerListener objects.
        protected void processContainerEvent(ContainerEvent e)
        Description copied from class: Container
        Processes container events occurring on this container by dispatching them to any registered ContainerListener objects. NOTE: This method will not be called unless container events are enabled for this component; this happens when one of the following occurs:
        • A ContainerListener object is registered via addContainerListener
        • Container events are enabled via enableEvents

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

        Parameters:
        e - the container event
        See Also:
        Component.enableEvents(long)
        Overridden member indicator processEvent Reveal DetailHide Detail
        protected void processEvent(AWTEvent e)
        Processes events on this window.
        protected void processEvent(AWTEvent e)
        Processes events on this window. If the event is an WindowEvent, it invokes the processWindowEvent method, else it invokes its superclass's processEvent.

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

        Overrides:
        processEvent in class Container
        Parameters:
        e - the event
        See Also:
        Component.processComponentEvent(java.awt.event.ComponentEvent), Component.processFocusEvent(java.awt.event.FocusEvent), Component.processKeyEvent(java.awt.event.KeyEvent), Component.processMouseEvent(java.awt.event.MouseEvent), Component.processMouseMotionEvent(java.awt.event.MouseEvent), Component.processInputMethodEvent(java.awt.event.InputMethodEvent), Component.processHierarchyEvent(java.awt.event.HierarchyEvent), Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent)
        Inherited member indicator processFocusEvent Reveal DetailHide Detail
        protected void processFocusEvent(FocusEvent e)
        Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.
        protected void processFocusEvent(FocusEvent e)
        Description copied from class: Component
        Processes focus events occurring on this component by dispatching them to any registered FocusListener objects.

        This method is not called unless focus events are enabled for this component. Focus events are enabled when one of the following occurs:

        • A FocusListener object is registered via addFocusListener.
        • Focus events are enabled via enableEvents.

        If focus events are enabled for a Component, the current KeyboardFocusManager determines whether or not a focus event should be dispatched to registered FocusListener objects. If the events are to be dispatched, the KeyboardFocusManager calls the Component's dispatchEvent method, which results in a call to the Component's processFocusEvent method.

        If focus events are enabled for a Component, calling the Component's dispatchEvent method with a FocusEvent as the argument will result in a call to the Component's processFocusEvent method regardless of the current KeyboardFocusManager.

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

        Parameters:
        e - the focus event
        Since:
        JDK1.1
        See Also:
        FocusEvent, FocusListener, KeyboardFocusManager, Component.addFocusListener(java.awt.event.FocusListener), Component.enableEvents(long), Component.dispatchEvent(java.awt.AWTEvent)
        Inherited member indicator processHierarchyBoundsEvent Reveal DetailHide Detail
        protected void processHierarchyBoundsEvent(HierarchyEvent e)
        Processes hierarchy bounds events occurring on this component by dispatching them to any registered HierarchyBoundsListener objects.
        protected void processHierarchyBoundsEvent(HierarchyEvent e)
        Description copied from class: Component
        Processes hierarchy bounds events occurring on this component by dispatching them to any registered HierarchyBoundsListener objects.

        This method is not called unless hierarchy bounds events are enabled for this component. Hierarchy bounds events are enabled when one of the following occurs:

        • An HierarchyBoundsListener object is registered via addHierarchyBoundsListener.
        • Hierarchy bounds events are enabled via enableEvents.

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

        Parameters:
        e - the hierarchy event
        Since:
        1.3
        See Also:
        HierarchyEvent, HierarchyBoundsListener, Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener), Component.enableEvents(long)
        Inherited member indicator processHierarchyEvent Reveal DetailHide Detail
        protected void processHierarchyEvent(HierarchyEvent e)
        Processes hierarchy events occurring on this component by dispatching them to any registered HierarchyListener objects.
        protected void processHierarchyEvent(HierarchyEvent e)
        Description copied from class: Component
        Processes hierarchy events occurring on this component by dispatching them to any registered HierarchyListener objects.

        This method is not called unless hierarchy events are enabled for this component. Hierarchy events are enabled when one of the following occurs:

        • An HierarchyListener object is registered via addHierarchyListener.
        • Hierarchy events are enabled via enableEvents.

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

        Parameters:
        e - the hierarchy event
        Since:
        1.3
        See Also:
        HierarchyEvent, HierarchyListener, Component.addHierarchyListener(java.awt.event.HierarchyListener), Component.enableEvents(long)
        Inherited member indicator processInputMethodEvent Reveal DetailHide Detail
        protected void processInputMethodEvent(InputMethodEvent e)
        Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects.
        protected void processInputMethodEvent(InputMethodEvent e)
        Description copied from class: Component
        Processes input method events occurring on this component by dispatching them to any registered InputMethodListener objects.

        This method is not called unless input method events are enabled for this component. Input method events are enabled when one of the following occurs:

        • An InputMethodListener object is registered via addInputMethodListener.
        • Input method events are enabled via enableEvents.

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

        Parameters:
        e - the input method event
        Since:
        1.2
        See Also:
        InputMethodEvent, InputMethodListener, Component.addInputMethodListener(java.awt.event.InputMethodListener), Component.enableEvents(long)
        Inherited member indicator processKeyEvent Reveal DetailHide Detail
        protected void processKeyEvent(KeyEvent e)
        Processes key events occurring on this component by dispatching them to any registered KeyListener objects.
        protected void processKeyEvent(KeyEvent e)
        Description copied from class: Component
        Processes key events occurring on this component by dispatching them to any registered KeyListener objects.

        This method is not called unless key events are enabled for this component. Key events are enabled when one of the following occurs:

        • A KeyListener object is registered via addKeyListener.
        • Key events are enabled via enableEvents.

        If key events are enabled for a Component, the current KeyboardFocusManager determines whether or not a key event should be dispatched to registered KeyListener objects. The DefaultKeyboardFocusManager will not dispatch key events to a Component that is not the focus owner or is not showing.

        As of J2SE 1.4, KeyEvents are redirected to the focus owner. Please see the Focus Specification for further information.

        Calling a Component's dispatchEvent method with a KeyEvent as the argument will result in a call to the Component's processKeyEvent method regardless of the current KeyboardFocusManager as long as the component is showing, focused, and enabled, and key events are enabled on it.

        If the event parameter is null the behavior is unspecified and may result in an exception.

        Parameters:
        e - the key event
        Since:
        JDK1.1
        See Also:
        KeyEvent, KeyListener, KeyboardFocusManager, DefaultKeyboardFocusManager, Component.processEvent(java.awt.AWTEvent), Component.dispatchEvent(java.awt.AWTEvent), Component.addKeyListener(java.awt.event.KeyListener), Component.enableEvents(long), Component.isShowing()
        Inherited member indicator processMouseEvent Reveal DetailHide Detail
        protected void processMouseEvent(MouseEvent e)
        Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.
        protected void processMouseEvent(MouseEvent e)
        Description copied from class: Component
        Processes mouse events occurring on this component by dispatching them to any registered MouseListener objects.

        This method is not called unless mouse events are enabled for this component. Mouse events are enabled when one of the following occurs:

        • A MouseListener object is registered via addMouseListener.
        • Mouse events are enabled via enableEvents.

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

        Parameters:
        e - the mouse event
        Since:
        JDK1.1
        See Also:
        MouseEvent, MouseListener, Component.addMouseListener(java.awt.event.MouseListener), Component.enableEvents(long)
        Inherited member indicator processMouseMotionEvent Reveal DetailHide Detail
        protected void processMouseMotionEvent(MouseEvent e)
        Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.
        protected void processMouseMotionEvent(MouseEvent e)
        Description copied from class: Component
        Processes mouse motion events occurring on this component by dispatching them to any registered MouseMotionListener objects.

        This method is not called unless mouse motion events are enabled for this component. Mouse motion events are enabled when one of the following occurs:

        • A MouseMotionListener object is registered via addMouseMotionListener.
        • Mouse motion events are enabled via enableEvents.

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

        Parameters:
        e - the mouse motion event
        Since:
        JDK1.1
        See Also:
        MouseEvent, MouseMotionListener, Component.addMouseMotionListener(java.awt.event.MouseMotionListener), Component.enableEvents(long)
        Inherited member indicator processMouseWheelEvent Reveal DetailHide Detail
        protected void processMouseWheelEvent(MouseWheelEvent e)
        Processes mouse wheel events occurring on this component by dispatching them to any registered MouseWheelListener objects.
        protected void processMouseWheelEvent(MouseWheelEvent e)
        Description copied from class: Component
        Processes mouse wheel events occurring on this component by dispatching them to any registered MouseWheelListener objects.

        This method is not called unless mouse wheel events are enabled for this component. Mouse wheel events are enabled when one of the following occurs:

        • A MouseWheelListener object is registered via addMouseWheelListener.
        • Mouse wheel events are enabled via enableEvents.

        For information on how mouse wheel events are dispatched, see the class description for MouseWheelEvent.

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

        Parameters:
        e - the mouse wheel event
        Since:
        1.4
        See Also:
        MouseWheelEvent, MouseWheelListener, Component.addMouseWheelListener(java.awt.event.MouseWheelListener), Component.enableEvents(long)
      • Event Registration Methods 
        Modifier and Type Method and Description
        Inherited member indicator addComponentListener Reveal DetailHide Detail
        void addComponentListener(ComponentListener l)
        Adds the specified component listener to receive component events from this component.
        public void addComponentListener(ComponentListener l)
        Description copied from class: Component
        Adds the specified component listener to receive component events from this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the component listener
        Since:
        JDK1.1
        See Also:
        ComponentEvent, ComponentListener, Component.removeComponentListener(java.awt.event.ComponentListener), Component.getComponentListeners()
        Inherited member indicator addContainerListener Reveal DetailHide Detail
        void addContainerListener(ContainerListener l)
        Adds the specified container listener to receive container events from this container.
        public void addContainerListener(ContainerListener l)
        Description copied from class: Container
        Adds the specified container listener to receive container events from this container. If l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the container listener
        See Also:
        Container.removeContainerListener(java.awt.event.ContainerListener), Container.getContainerListeners()
        Inherited member indicator addFocusListener Reveal DetailHide Detail
        void addFocusListener(FocusListener l)
        Adds the specified focus listener to receive focus events from this component when this component gains input focus.
        public void addFocusListener(FocusListener l)
        Description copied from class: Component
        Adds the specified focus listener to receive focus events from this component when this component gains input focus. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the focus listener
        Since:
        JDK1.1
        See Also:
        FocusEvent, FocusListener, Component.removeFocusListener(java.awt.event.FocusListener), Component.getFocusListeners()
        Inherited member indicator addHierarchyBoundsListener Reveal DetailHide Detail
        void addHierarchyBoundsListener(HierarchyBoundsListener l)
        Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component when the hierarchy to which this container belongs changes.
        public void addHierarchyBoundsListener(HierarchyBoundsListener l)
        Description copied from class: Component
        Adds the specified hierarchy bounds listener to receive hierarchy bounds events from this component when the hierarchy to which this container belongs changes. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the hierarchy bounds listener
        Since:
        1.3
        See Also:
        HierarchyEvent, HierarchyBoundsListener, Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener), Component.getHierarchyBoundsListeners()
        Inherited member indicator addHierarchyListener Reveal DetailHide Detail
        void addHierarchyListener(HierarchyListener l)
        Adds the specified hierarchy listener to receive hierarchy changed events from this component when the hierarchy to which this container belongs changes.
        public void addHierarchyListener(HierarchyListener l)
        Description copied from class: Component
        Adds the specified hierarchy listener to receive hierarchy changed events from this component when the hierarchy to which this container belongs changes. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the hierarchy listener
        Since:
        1.3
        See Also:
        HierarchyEvent, HierarchyListener, Component.removeHierarchyListener(java.awt.event.HierarchyListener), Component.getHierarchyListeners()
        Inherited member indicator addInputMethodListener Reveal DetailHide Detail
        void addInputMethodListener(InputMethodListener l)
        Adds the specified input method listener to receive input method events from this component.
        public void addInputMethodListener(InputMethodListener l)
        Description copied from class: Component
        Adds the specified input method listener to receive input method events from this component. A component will only receive input method events from input methods if it also overrides getInputMethodRequests to return an InputMethodRequests instance. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the input method listener
        Since:
        1.2
        See Also:
        InputMethodEvent, InputMethodListener, Component.removeInputMethodListener(java.awt.event.InputMethodListener), Component.getInputMethodListeners(), Component.getInputMethodRequests()
        Inherited member indicator addKeyListener Reveal DetailHide Detail
        void addKeyListener(KeyListener l)
        Adds the specified key listener to receive key events from this component.
        public void addKeyListener(KeyListener l)
        Description copied from class: Component
        Adds the specified key listener to receive key events from this component. If l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the key listener.
        Since:
        JDK1.1
        See Also:
        KeyEvent, KeyListener, Component.removeKeyListener(java.awt.event.KeyListener), Component.getKeyListeners()
        Inherited member indicator addMouseListener Reveal DetailHide Detail
        void addMouseListener(MouseListener l)
        Adds the specified mouse listener to receive mouse events from this component.
        public void addMouseListener(MouseListener l)
        Description copied from class: Component
        Adds the specified mouse listener to receive mouse events from this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the mouse listener
        Since:
        JDK1.1
        See Also:
        MouseEvent, MouseListener, Component.removeMouseListener(java.awt.event.MouseListener), Component.getMouseListeners()
        Inherited member indicator addMouseMotionListener Reveal DetailHide Detail
        void addMouseMotionListener(MouseMotionListener l)
        Adds the specified mouse motion listener to receive mouse motion events from this component.
        public void addMouseMotionListener(MouseMotionListener l)
        Description copied from class: Component
        Adds the specified mouse motion listener to receive mouse motion events from this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the mouse motion listener
        Since:
        JDK1.1
        See Also:
        MouseEvent, MouseMotionListener, Component.removeMouseMotionListener(java.awt.event.MouseMotionListener), Component.getMouseMotionListeners()
        Inherited member indicator addMouseWheelListener Reveal DetailHide Detail
        void addMouseWheelListener(MouseWheelListener l)
        Adds the specified mouse wheel listener to receive mouse wheel events from this component.
        public void addMouseWheelListener(MouseWheelListener l)
        Description copied from class: Component
        Adds the specified mouse wheel listener to receive mouse wheel events from this component. Containers also receive mouse wheel events from sub-components.

        For information on how mouse wheel events are dispatched, see the class description for MouseWheelEvent.

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

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the mouse wheel listener
        Since:
        1.4
        See Also:
        MouseWheelEvent, MouseWheelListener, Component.removeMouseWheelListener(java.awt.event.MouseWheelListener), Component.getMouseWheelListeners()
        Overridden member indicator addPropertyChangeListener Reveal DetailHide Detail
        void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
        Adds a PropertyChangeListener to the listener list.
        public void addPropertyChangeListener(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:
        • this Window's font ("font")
        • this Window's background color ("background")
        • this Window's foreground color ("foreground")
        • this Window's focusability ("focusable")
        • this Window's focus traversal keys enabled state ("focusTraversalKeysEnabled")
        • this Window's Set of FORWARD_TRAVERSAL_KEYS ("forwardFocusTraversalKeys")
        • this Window's Set of BACKWARD_TRAVERSAL_KEYS ("backwardFocusTraversalKeys")
        • this Window's Set of UP_CYCLE_TRAVERSAL_KEYS ("upCycleFocusTraversalKeys")
        • this Window's Set of DOWN_CYCLE_TRAVERSAL_KEYS ("downCycleFocusTraversalKeys")
        • this Window's focus traversal policy ("focusTraversalPolicy")
        • this Window's focusable Window state ("focusableWindowState")
        • this Window's always-on-top state("alwaysOnTop")
        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 in class Container
        Parameters:
        listener - the PropertyChangeListener to be added
        See Also:
        Component.removePropertyChangeListener(java.beans.PropertyChangeListener), addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)
        Overridden member indicator addPropertyChangeListener Reveal DetailHide Detail
        void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
        Adds a PropertyChangeListener to the listener list for a specific property.
        public void addPropertyChangeListener(java.lang.String propertyName, 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:
        • this Window's font ("font")
        • this Window's background color ("background")
        • this Window's foreground color ("foreground")
        • this Window's focusability ("focusable")
        • this Window's focus traversal keys enabled state ("focusTraversalKeysEnabled")
        • this Window's Set of FORWARD_TRAVERSAL_KEYS ("forwardFocusTraversalKeys")
        • this Window's Set of BACKWARD_TRAVERSAL_KEYS ("backwardFocusTraversalKeys")
        • this Window's Set of UP_CYCLE_TRAVERSAL_KEYS ("upCycleFocusTraversalKeys")
        • this Window's Set of DOWN_CYCLE_TRAVERSAL_KEYS ("downCycleFocusTraversalKeys")
        • this Window's focus traversal policy ("focusTraversalPolicy")
        • this Window's focusable Window state ("focusableWindowState")
        • this Window's always-on-top state("alwaysOnTop")
        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 in class Container
        Parameters:
        propertyName - one of the property names listed above
        listener - the PropertyChangeListener to be added
        See Also:
        addPropertyChangeListener(java.beans.PropertyChangeListener), Component.removePropertyChangeListener(java.beans.PropertyChangeListener)
        Inherited member indicator getComponentListeners Reveal DetailHide Detail
        ComponentListener[] getComponentListeners()
        Returns an array of all the component listeners registered on this component.
        public ComponentListener[] getComponentListeners()
        Description copied from class: Component
        Returns an array of all the component listeners registered on this component.
        Returns:
        all of this comonent's ComponentListeners or an empty array if no component listeners are currently registered
        Since:
        1.4
        See Also:
        Component.addComponentListener(java.awt.event.ComponentListener), Component.removeComponentListener(java.awt.event.ComponentListener)
        Inherited member indicator getContainerListeners Reveal DetailHide Detail
        ContainerListener[] getContainerListeners()
        Returns an array of all the container listeners registered on this container.
        public ContainerListener[] getContainerListeners()
        Description copied from class: Container
        Returns an array of all the container listeners registered on this container.
        Returns:
        all of this container's ContainerListeners or an empty array if no container listeners are currently registered
        Since:
        1.4
        See Also:
        Container.addContainerListener(java.awt.event.ContainerListener), Container.removeContainerListener(java.awt.event.ContainerListener)
        Inherited member indicator getFocusListeners Reveal DetailHide Detail
        FocusListener[] getFocusListeners()
        Returns an array of all the focus listeners registered on this component.
        public FocusListener[] getFocusListeners()
        Description copied from class: Component
        Returns an array of all the focus listeners registered on this component.
        Returns:
        all of this component's FocusListeners or an empty array if no component listeners are currently registered
        Since:
        1.4
        See Also:
        Component.addFocusListener(java.awt.event.FocusListener), Component.removeFocusListener(java.awt.event.FocusListener)
        Inherited member indicator getHierarchyBoundsListeners Reveal DetailHide Detail
        HierarchyBoundsListener[] getHierarchyBoundsListeners()
        Returns an array of all the hierarchy bounds listeners registered on this component.
        public HierarchyBoundsListener[] getHierarchyBoundsListeners()
        Description copied from class: Component
        Returns an array of all the hierarchy bounds listeners registered on this component.
        Returns:
        all of this component's HierarchyBoundsListeners or an empty array if no hierarchy bounds listeners are currently registered
        Since:
        1.4
        See Also:
        Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener), Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener)
        Inherited member indicator getHierarchyListeners Reveal DetailHide Detail
        HierarchyListener[] getHierarchyListeners()
        Returns an array of all the hierarchy listeners registered on this component.
        public HierarchyListener[] getHierarchyListeners()
        Description copied from class: Component
        Returns an array of all the hierarchy listeners registered on this component.
        Returns:
        all of this component's HierarchyListeners or an empty array if no hierarchy listeners are currently registered
        Since:
        1.4
        See Also:
        Component.addHierarchyListener(java.awt.event.HierarchyListener), Component.removeHierarchyListener(java.awt.event.HierarchyListener)
        Inherited member indicator getInputMethodListeners Reveal DetailHide Detail
        InputMethodListener[] getInputMethodListeners()
        Returns an array of all the input method listeners registered on this component.
        public InputMethodListener[] getInputMethodListeners()
        Description copied from class: Component
        Returns an array of all the input method listeners registered on this component.
        Returns:
        all of this component's InputMethodListeners or an empty array if no input method listeners are currently registered
        Since:
        1.4
        See Also:
        Component.addInputMethodListener(java.awt.event.InputMethodListener), Component.removeInputMethodListener(java.awt.event.InputMethodListener)
        Inherited member indicator getKeyListeners Reveal DetailHide Detail
        KeyListener[] getKeyListeners()
        Returns an array of all the key listeners registered on this component.
        public KeyListener[] getKeyListeners()
        Description copied from class: Component
        Returns an array of all the key listeners registered on this component.
        Returns:
        all of this component's KeyListeners or an empty array if no key listeners are currently registered
        Since:
        1.4
        See Also:
        Component.addKeyListener(java.awt.event.KeyListener), Component.removeKeyListener(java.awt.event.KeyListener)
        Inherited member indicator getMouseListeners Reveal DetailHide Detail
        MouseListener[] getMouseListeners()
        Returns an array of all the mouse listeners registered on this component.
        public MouseListener[] getMouseListeners()
        Description copied from class: Component
        Returns an array of all the mouse listeners registered on this component.
        Returns:
        all of this component's MouseListeners or an empty array if no mouse listeners are currently registered
        Since:
        1.4
        See Also:
        Component.addMouseListener(java.awt.event.MouseListener), Component.removeMouseListener(java.awt.event.MouseListener)
        Inherited member indicator getMouseMotionListeners Reveal DetailHide Detail
        MouseMotionListener[] getMouseMotionListeners()
        Returns an array of all the mouse motion listeners registered on this component.
        public MouseMotionListener[] getMouseMotionListeners()
        Description copied from class: Component
        Returns an array of all the mouse motion listeners registered on this component.
        Returns:
        all of this component's MouseMotionListeners or an empty array if no mouse motion listeners are currently registered
        Since:
        1.4
        See Also:
        Component.addMouseMotionListener(java.awt.event.MouseMotionListener), Component.removeMouseMotionListener(java.awt.event.MouseMotionListener)
        Inherited member indicator getMouseWheelListeners Reveal DetailHide Detail
        MouseWheelListener[] getMouseWheelListeners()
        Returns an array of all the mouse wheel listeners registered on this component.
        public MouseWheelListener[] getMouseWheelListeners()
        Description copied from class: Component
        Returns an array of all the mouse wheel listeners registered on this component.
        Returns:
        all of this component's MouseWheelListeners or an empty array if no mouse wheel listeners are currently registered
        Since:
        1.4
        See Also:
        Component.addMouseWheelListener(java.awt.event.MouseWheelListener), Component.removeMouseWheelListener(java.awt.event.MouseWheelListener)
        Inherited member indicator getPropertyChangeListeners Reveal DetailHide Detail
        java.beans.PropertyChangeListener[] getPropertyChangeListeners()
        Returns an array of all the property change listeners registered on this component.
        public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
        Description copied from class: Component
        Returns an array of all the property change listeners registered on this component.
        Returns:
        all of this component's PropertyChangeListeners or an empty array if no property change listeners are currently registered
        Since:
        1.4
        See Also:
        Component.addPropertyChangeListener(java.beans.PropertyChangeListener), Component.removePropertyChangeListener(java.beans.PropertyChangeListener), Component.getPropertyChangeListeners(java.lang.String), PropertyChangeSupport.getPropertyChangeListeners()
        Inherited member indicator getPropertyChangeListeners Reveal DetailHide Detail
        java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
        Returns an array of all the listeners which have been associated with the named property.
        public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
        Description copied from class: Component
        Returns an array of all the listeners which have been associated with the named property.
        Returns:
        all of the PropertyChangeListeners associated with the named property; if no such listeners have been added or if propertyName is null, an empty array is returned
        Since:
        1.4
        See Also:
        Component.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), Component.getPropertyChangeListeners()
        Inherited member indicator removeComponentListener Reveal DetailHide Detail
        void removeComponentListener(ComponentListener l)
        Removes the specified component listener so that it no longer receives component events from this component.
        public void removeComponentListener(ComponentListener l)
        Description copied from class: Component
        Removes the specified component listener so that it no longer receives component events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the component listener
        Since:
        JDK1.1
        See Also:
        ComponentEvent, ComponentListener, Component.addComponentListener(java.awt.event.ComponentListener), Component.getComponentListeners()
        Inherited member indicator removeContainerListener Reveal DetailHide Detail
        void removeContainerListener(ContainerListener l)
        Removes the specified container listener so it no longer receives container events from this container.
        public void removeContainerListener(ContainerListener l)
        Description copied from class: Container
        Removes the specified container listener so it no longer receives container events from this container. If l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the container listener
        See Also:
        Container.addContainerListener(java.awt.event.ContainerListener), Container.getContainerListeners()
        Inherited member indicator removeFocusListener Reveal DetailHide Detail
        void removeFocusListener(FocusListener l)
        Removes the specified focus listener so that it no longer receives focus events from this component.
        public void removeFocusListener(FocusListener l)
        Description copied from class: Component
        Removes the specified focus listener so that it no longer receives focus events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the focus listener
        Since:
        JDK1.1
        See Also:
        FocusEvent, FocusListener, Component.addFocusListener(java.awt.event.FocusListener), Component.getFocusListeners()
        Inherited member indicator removeHierarchyBoundsListener Reveal DetailHide Detail
        void removeHierarchyBoundsListener(HierarchyBoundsListener l)
        Removes the specified hierarchy bounds listener so that it no longer receives hierarchy bounds events from this component.
        public void removeHierarchyBoundsListener(HierarchyBoundsListener l)
        Description copied from class: Component
        Removes the specified hierarchy bounds listener so that it no longer receives hierarchy bounds events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the hierarchy bounds listener
        Since:
        1.3
        See Also:
        HierarchyEvent, HierarchyBoundsListener, Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener), Component.getHierarchyBoundsListeners()
        Inherited member indicator removeHierarchyListener Reveal DetailHide Detail
        void removeHierarchyListener(HierarchyListener l)
        Removes the specified hierarchy listener so that it no longer receives hierarchy changed events from this component.
        public void removeHierarchyListener(HierarchyListener l)
        Description copied from class: Component
        Removes the specified hierarchy listener so that it no longer receives hierarchy changed events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the hierarchy listener
        Since:
        1.3
        See Also:
        HierarchyEvent, HierarchyListener, Component.addHierarchyListener(java.awt.event.HierarchyListener), Component.getHierarchyListeners()
        Inherited member indicator removeInputMethodListener Reveal DetailHide Detail
        void removeInputMethodListener(InputMethodListener l)
        Removes the specified input method listener so that it no longer receives input method events from this component.
        public void removeInputMethodListener(InputMethodListener l)
        Description copied from class: Component
        Removes the specified input method listener so that it no longer receives input method events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the input method listener
        Since:
        1.2
        See Also:
        InputMethodEvent, InputMethodListener, Component.addInputMethodListener(java.awt.event.InputMethodListener), Component.getInputMethodListeners()
        Inherited member indicator removeKeyListener Reveal DetailHide Detail
        void removeKeyListener(KeyListener l)
        Removes the specified key listener so that it no longer receives key events from this component.
        public void removeKeyListener(KeyListener l)
        Description copied from class: Component
        Removes the specified key listener so that it no longer receives key events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the key listener
        Since:
        JDK1.1
        See Also:
        KeyEvent, KeyListener, Component.addKeyListener(java.awt.event.KeyListener), Component.getKeyListeners()
        Inherited member indicator removeMouseListener Reveal DetailHide Detail
        void removeMouseListener(MouseListener l)
        Removes the specified mouse listener so that it no longer receives mouse events from this component.
        public void removeMouseListener(MouseListener l)
        Description copied from class: Component
        Removes the specified mouse listener so that it no longer receives mouse events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the mouse listener
        Since:
        JDK1.1
        See Also:
        MouseEvent, MouseListener, Component.addMouseListener(java.awt.event.MouseListener), Component.getMouseListeners()
        Inherited member indicator removeMouseMotionListener Reveal DetailHide Detail
        void removeMouseMotionListener(MouseMotionListener l)
        Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component.
        public void removeMouseMotionListener(MouseMotionListener l)
        Description copied from class: Component
        Removes the specified mouse motion listener so that it no longer receives mouse motion events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the mouse motion listener
        Since:
        JDK1.1
        See Also:
        MouseEvent, MouseMotionListener, Component.addMouseMotionListener(java.awt.event.MouseMotionListener), Component.getMouseMotionListeners()
        Inherited member indicator removeMouseWheelListener Reveal DetailHide Detail
        void removeMouseWheelListener(MouseWheelListener l)
        Removes the specified mouse wheel listener so that it no longer receives mouse wheel events from this component.
        public void removeMouseWheelListener(MouseWheelListener l)
        Description copied from class: Component
        Removes the specified mouse wheel listener so that it no longer receives mouse wheel events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If l is null, no exception is thrown and no action is performed.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the mouse wheel listener.
        Since:
        1.4
        See Also:
        MouseWheelEvent, MouseWheelListener, Component.addMouseWheelListener(java.awt.event.MouseWheelListener), Component.getMouseWheelListeners()
        Inherited member indicator removePropertyChangeListener Reveal DetailHide Detail
        void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
        Removes a PropertyChangeListener from the listener list.
        public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
        Description copied from class: Component
        Removes a PropertyChangeListener from the listener list. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of this class.

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

        Parameters:
        listener - the PropertyChangeListener to be removed
        See Also:
        Component.addPropertyChangeListener(java.beans.PropertyChangeListener), Component.getPropertyChangeListeners(), Component.removePropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener)
        Inherited member indicator removePropertyChangeListener Reveal DetailHide Detail
        void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
        Removes a PropertyChangeListener from the listener list for a specific property.
        public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
        Description copied from class: Component
        Removes a PropertyChangeListener from the listener list for a specific property. This method should be used to remove PropertyChangeListeners that were registered for a specific bound property.

        If propertyName or listener is null, no exception is thrown and no action is taken.

        Parameters:
        propertyName - a valid property name
        listener - the PropertyChangeListener to be removed
        See Also:
        Component.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener), Component.getPropertyChangeListeners(java.lang.String), Component.removePropertyChangeListener(java.beans.PropertyChangeListener)
      • Keyboard Focus Methods 
        Modifier and Type Method and Description
        Inherited member indicator areFocusTraversalKeysSet Reveal DetailHide Detail
        boolean areFocusTraversalKeysSet(int id)
        Returns whether the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Container.
        public boolean areFocusTraversalKeysSet(int id)
        Description copied from class: Container
        Returns whether the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Container. If this method returns false, this Container is inheriting the Set from an ancestor, or from the current KeyboardFocusManager.
        Overrides:
        areFocusTraversalKeysSet in class Component
        Parameters:
        id - one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
        Returns:
        true if the the Set of focus traversal keys for the given focus traversal operation has been explicitly defined for this Component; false otherwise.
        Throws:
        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
        Overridden member indicator getFocusCycleRootAncestor Reveal DetailHide Detail
        Container getFocusCycleRootAncestor()
        Always returns null because Windows have no ancestors; they represent the top of the Component hierarchy.
        public final Container getFocusCycleRootAncestor()
        Always returns null because Windows have no ancestors; they represent the top of the Component hierarchy.
        Overrides:
        getFocusCycleRootAncestor in class Component
        Returns:
        null
        Since:
        1.4
        See Also:
        Container.isFocusCycleRoot()
        Overridden member indicator getFocusTraversalKeys Reveal DetailHide Detail
        java.util.Set<AWTKeyStroke> getFocusTraversalKeys(int id)
        Gets a focus traversal key for this Window.
        public java.util.Set<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 in class 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:
        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<? extends java.awt.AWTKeyStroke>), KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
        Inherited member indicator getFocusTraversalKeysEnabled Reveal DetailHide Detail
        boolean getFocusTraversalKeysEnabled()
        Returns whether focus traversal keys are enabled for this Component.
        public boolean getFocusTraversalKeysEnabled()
        Description copied from class: Component
        Returns whether focus traversal keys are enabled for this Component. Components for which focus traversal keys are disabled receive key events for focus traversal keys. Components for which focus traversal keys are enabled do not see these events; instead, the events are automatically converted to traversal operations.
        Returns:
        whether focus traversal keys are enabled for this Component
        Since:
        1.4
        See Also:
        Component.setFocusTraversalKeysEnabled(boolean), Component.setFocusTraversalKeys(int, java.util.Set<? extends java.awt.AWTKeyStroke>), Component.getFocusTraversalKeys(int)
        Inherited member indicator getFocusTraversalPolicy Reveal DetailHide Detail
        FocusTraversalPolicy getFocusTraversalPolicy()
        Returns the focus traversal policy that will manage keyboard traversal of this Container's children, or null if this Container is not a focus cycle root.
        public FocusTraversalPolicy getFocusTraversalPolicy()
        Description copied from class: Container
        Returns the focus traversal policy that will manage keyboard traversal of this Container's children, or null if this Container is not a focus cycle root. If no traversal policy has been explicitly set for this Container, then this Container's focus-cycle-root ancestor's policy is returned.
        Returns:
        this Container's focus traversal policy, or null if this Container is not a focus cycle root.
        Since:
        1.4
        See Also:
        Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy), Container.setFocusCycleRoot(boolean), Container.isFocusCycleRoot(java.awt.Container)
        Inherited member indicator gotFocus Reveal DetailHide Detail
        boolean gotFocus(Event evt, java.lang.Object what)
        Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
        @Deprecated public boolean gotFocus(Event evt, java.lang.Object what)
        Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
        Inherited member indicator hasFocus Reveal DetailHide Detail
        boolean hasFocus()
        Returns true if this Component is the focus owner.
        public boolean hasFocus()
        Description copied from class: Component
        Returns true if this Component is the focus owner. This method is obsolete, and has been replaced by isFocusOwner().
        Returns:
        true if this Component is the focus owner; false otherwise
        Since:
        1.2
        Inherited member indicator isFocusable Reveal DetailHide Detail
        boolean isFocusable()
        Returns whether this Component can be focused.
        public boolean isFocusable()
        Description copied from class: Component
        Returns whether this Component can be focused.
        Returns:
        true if this Component is focusable; false otherwise.
        Since:
        1.4
        See Also:
        Component.setFocusable(boolean)
        Overridden member indicator isFocusCycleRoot Reveal DetailHide Detail
        boolean isFocusCycleRoot()
        Always returns true because all Windows must be roots of a focus traversal cycle.
        public final boolean isFocusCycleRoot()
        Always returns true because all Windows must be roots of a focus traversal cycle.
        Overrides:
        isFocusCycleRoot in class Container
        Returns:
        true
        Since:
        1.4
        See Also:
        setFocusCycleRoot(boolean), Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy), Container.getFocusTraversalPolicy()
        Inherited member indicator isFocusCycleRoot Reveal DetailHide Detail
        boolean isFocusCycleRoot(Container container)
        Returns whether the specified Container is the focus cycle root of this Container's focus traversal cycle.
        public boolean isFocusCycleRoot(Container container)
        Description copied from class: Container
        Returns whether the specified Container is the focus cycle root of this Container's focus traversal cycle. Each focus traversal cycle has only a single focus cycle root and each Container which is not a focus cycle root belongs to only a single focus traversal cycle. Containers which are focus cycle roots belong to two cycles: one rooted at the Container itself, and one rooted at the Container's nearest focus-cycle-root ancestor. This method will return true for both such Containers in this case.
        Overrides:
        isFocusCycleRoot in class Component
        Parameters:
        container - the Container to be tested
        Returns:
        true if the specified Container is a focus-cycle- root of this Container; false otherwise
        Since:
        1.4
        See Also:
        Container.isFocusCycleRoot()
        Inherited member indicator isFocusOwner Reveal DetailHide Detail
        boolean isFocusOwner()
        Returns true if this Component is the focus owner.
        public boolean isFocusOwner()
        Description copied from class: Component
        Returns true if this Component is the focus owner.
        Returns:
        true if this Component is the focus owner; false otherwise
        Since:
        1.4
        Inherited member indicator isFocusTraversable Reveal DetailHide Detail
        boolean isFocusTraversable()
        Deprecated. As of 1.4, replaced by isFocusable().
        @Deprecated public boolean isFocusTraversable()
        Deprecated. As of 1.4, replaced by isFocusable().
        Description copied from class: Component
        Returns whether this Component can become the focus owner.
        Returns:
        true if this Component is focusable; false otherwise
        Since:
        JDK1.1
        See Also:
        Component.setFocusable(boolean)
        Inherited member indicator isFocusTraversalPolicyProvider Reveal DetailHide Detail
        boolean isFocusTraversalPolicyProvider()
        Returns whether this container provides focus traversal policy.
        public final boolean isFocusTraversalPolicyProvider()
        Description copied from class: Container
        Returns whether this container provides focus traversal policy. If this property is set to true then when keyboard focus manager searches container hierarchy for focus traversal policy and encounters this container before any other container with this property as true or focus cycle roots then its focus traversal policy will be used instead of focus cycle root's policy.
        Returns:
        true if this container provides focus traversal policy, false otherwise
        Since:
        1.5
        See Also:
        Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy), Container.getFocusTraversalPolicy(), Container.setFocusCycleRoot(boolean), Container.setFocusTraversalPolicyProvider(boolean)
        Inherited member indicator isFocusTraversalPolicySet Reveal DetailHide Detail
        boolean isFocusTraversalPolicySet()
        Returns whether the focus traversal policy has been explicitly set for this Container.
        public boolean isFocusTraversalPolicySet()
        Description copied from class: Container
        Returns whether the focus traversal policy has been explicitly set for this Container. If this method returns false, this Container will inherit its focus traversal policy from an ancestor.
        Returns:
        true if the focus traversal policy has been explicitly set for this Container; false otherwise.
        Since:
        1.4
        Inherited member indicator lostFocus Reveal DetailHide Detail
        boolean lostFocus(Event evt, java.lang.Object what)
        Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
        @Deprecated public boolean lostFocus(Event evt, java.lang.Object what)
        Deprecated. As of JDK version 1.1, replaced by processFocusEvent(FocusEvent).
        Inherited member indicator nextFocus Reveal DetailHide Detail
        void nextFocus()
        Deprecated. As of JDK version 1.1, replaced by transferFocus().
        @Deprecated public void nextFocus()
        Deprecated. As of JDK version 1.1, replaced by transferFocus().
        Inherited member indicator requestFocus Reveal DetailHide Detail
        void requestFocus()
        Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.
        public void requestFocus()
        Description copied from class: Component
        Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window. This component must be displayable, focusable, visible and all of its ancestors (with the exception of the top-level Window) must be visible for the request to be granted. Every effort will be made to honor the request; however, in some cases it may be impossible to do so. Developers must never assume that this Component is the focus owner until this Component receives a FOCUS_GAINED event. If this request is denied because this Component's top-level Window cannot become the focused Window, the request will be remembered and will be granted when the Window is later focused by the user.

        This method cannot be used to set the focus owner to no Component at all. Use KeyboardFocusManager.clearGlobalFocusOwner() instead.

        Because the focus behavior of this method is platform-dependent, developers are strongly encouraged to use requestFocusInWindow when possible.

        Note: Not all focus transfers result from invoking this method. As such, a component may receive focus without this or any of the other requestFocus methods of Component being invoked.

        Since:
        JDK1.0
        See Also:
        Component.requestFocusInWindow(), FocusEvent, Component.addFocusListener(java.awt.event.FocusListener), Component.isFocusable(), Component.isDisplayable(), KeyboardFocusManager.clearGlobalFocusOwner()
        Inherited member indicator requestFocus Reveal DetailHide Detail
        protected boolean requestFocus(boolean temporary)
        Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.
        protected boolean requestFocus(boolean temporary)
        Description copied from class: Component
        Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window. This component must be displayable, focusable, visible and all of its ancestors (with the exception of the top-level Window) must be visible for the request to be granted. Every effort will be made to honor the request; however, in some cases it may be impossible to do so. Developers must never assume that this component is the focus owner until this component receives a FOCUS_GAINED event. If this request is denied because this component's top-level window cannot become the focused window, the request will be remembered and will be granted when the window is later focused by the user.

        This method returns a boolean value. If false is returned, the request is guaranteed to fail. If true is returned, the request will succeed unless it is vetoed, or an extraordinary event, such as disposal of the component's peer, occurs before the request can be granted by the native windowing system. Again, while a return value of true indicates that the request is likely to succeed, developers must never assume that this component is the focus owner until this component receives a FOCUS_GAINED event.

        This method cannot be used to set the focus owner to no component at all. Use KeyboardFocusManager.clearGlobalFocusOwner instead.

        Because the focus behavior of this method is platform-dependent, developers are strongly encouraged to use requestFocusInWindow when possible.

        Every effort will be made to ensure that FocusEvents generated as a result of this request will have the specified temporary value. However, because specifying an arbitrary temporary state may not be implementable on all native windowing systems, correct behavior for this method can be guaranteed only for lightweight Components. This method is not intended for general use, but exists instead as a hook for lightweight component libraries, such as Swing.

        Note: Not all focus transfers result from invoking this method. As such, a component may receive focus without this or any of the other requestFocus methods of Component being invoked.

        Parameters:
        temporary - true if the focus change is temporary, such as when the window loses the focus; for more information on temporary focus changes see the Focus Specification
        Returns:
        false if the focus change request is guaranteed to fail; true if it is likely to succeed
        Since:
        1.4
        See Also:
        FocusEvent, Component.addFocusListener(java.awt.event.FocusListener), Component.isFocusable(), Component.isDisplayable(), KeyboardFocusManager.clearGlobalFocusOwner()
        Inherited member indicator requestFocusInWindow Reveal DetailHide Detail
        boolean requestFocusInWindow()
        Requests that this Component get the input focus, if this Component's top-level ancestor is already the focused Window.
        public boolean requestFocusInWindow()
        Description copied from class: Component
        Requests that this Component get the input focus, if this Component's top-level ancestor is already the focused Window. This component must be displayable, focusable, visible and all of its ancestors (with the exception of the top-level Window) must be visible for the request to be granted. Every effort will be made to honor the request; however, in some cases it may be impossible to do so. Developers must never assume that this Component is the focus owner until this Component receives a FOCUS_GAINED event.

        This method returns a boolean value. If false is returned, the request is guaranteed to fail. If true is returned, the request will succeed unless it is vetoed, or an extraordinary event, such as disposal of the Component's peer, occurs before the request can be granted by the native windowing system. Again, while a return value of true indicates that the request is likely to succeed, developers must never assume that this Component is the focus owner until this Component receives a FOCUS_GAINED event.

        This method cannot be used to set the focus owner to no Component at all. Use KeyboardFocusManager.clearGlobalFocusOwner() instead.

        The focus behavior of this method can be implemented uniformly across platforms, and thus developers are strongly encouraged to use this method over requestFocus when possible. Code which relies on requestFocus may exhibit different focus behavior on different platforms.

        Note: Not all focus transfers result from invoking this method. As such, a component may receive focus without this or any of the other requestFocus methods of Component being invoked.

        Returns:
        false if the focus change request is guaranteed to fail; true if it is likely to succeed
        Since:
        1.4
        See Also:
        Component.requestFocus(), FocusEvent, Component.addFocusListener(java.awt.event.FocusListener), Component.isFocusable(), Component.isDisplayable(), KeyboardFocusManager.clearGlobalFocusOwner()
        Inherited member indicator requestFocusInWindow Reveal DetailHide Detail
        protected boolean requestFocusInWindow(boolean temporary)
        Requests that this Component get the input focus, if this Component's top-level ancestor is already the focused Window.
        protected boolean requestFocusInWindow(boolean temporary)
        Description copied from class: Component
        Requests that this Component get the input focus, if this Component's top-level ancestor is already the focused Window. This component must be displayable, focusable, visible and all of its ancestors (with the exception of the top-level Window) must be visible for the request to be granted. Every effort will be made to honor the request; however, in some cases it may be impossible to do so. Developers must never assume that this component is the focus owner until this component receives a FOCUS_GAINED event.

        This method returns a boolean value. If false is returned, the request is guaranteed to fail. If true is returned, the request will succeed unless it is vetoed, or an extraordinary event, such as disposal of the component's peer, occurs before the request can be granted by the native windowing system. Again, while a return value of true indicates that the request is likely to succeed, developers must never assume that this component is the focus owner until this component receives a FOCUS_GAINED event.

        This method cannot be used to set the focus owner to no component at all. Use KeyboardFocusManager.clearGlobalFocusOwner instead.

        The focus behavior of this method can be implemented uniformly across platforms, and thus developers are strongly encouraged to use this method over requestFocus when possible. Code which relies on requestFocus may exhibit different focus behavior on different platforms.

        Every effort will be made to ensure that FocusEvents generated as a result of this request will have the specified temporary value. However, because specifying an arbitrary temporary state may not be implementable on all native windowing systems, correct behavior for this method can be guaranteed only for lightweight components. This method is not intended for general use, but exists instead as a hook for lightweight component libraries, such as Swing.

        Note: Not all focus transfers result from invoking this method. As such, a component may receive focus without this or any of the other requestFocus methods of Component being invoked.

        Parameters:
        temporary - true if the focus change is temporary, such as when the window loses the focus; for more information on temporary focus changes see the Focus Specification
        Returns:
        false if the focus change request is guaranteed to fail; true if it is likely to succeed
        Since:
        1.4
        See Also:
        Component.requestFocus(), FocusEvent, Component.addFocusListener(java.awt.event.FocusListener), Component.isFocusable(), Component.isDisplayable(), KeyboardFocusManager.clearGlobalFocusOwner()
        Inherited member indicator setFocusable Reveal DetailHide Detail
        void setFocusable(boolean focusable)
        Sets the focusable state of this Component to the specified value.
        public void setFocusable(boolean focusable)
        Description copied from class: Component
        Sets the focusable state of this Component to the specified value. This value overrides the Component's default focusability.
        Parameters:
        focusable - indicates whether this Component is focusable
        Since:
        1.4
        See Also:
        Component.isFocusable()
        Overridden member indicator setFocusCycleRoot Reveal DetailHide Detail
        void setFocusCycleRoot(boolean focusCycleRoot)
        Does nothing because Windows must always be roots of a focus traversal cycle.
        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 in class Container
        Parameters:
        focusCycleRoot - this value is ignored
        Since:
        1.4
        See Also:
        isFocusCycleRoot(), Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy), Container.getFocusTraversalPolicy()
        Inherited member indicator setFocusTraversalKeys Reveal DetailHide Detail
        void setFocusTraversalKeys(int id, java.util.Set<? extends AWTKeyStroke> keystrokes)
        Sets the focus traversal keys for a given traversal operation for this Container.
        public void setFocusTraversalKeys(int id, java.util.Set<? extends AWTKeyStroke> keystrokes)
        Description copied from class: Container
        Sets the focus traversal keys for a given traversal operation for this Container.

        The default values for a Container's focus traversal keys are implementation-dependent. Sun recommends that all implementations for a particular native platform use the same default values. The recommendations for Windows and Unix are listed below. These recommendations are used in the Sun AWT implementations.

        Identifier Meaning Default
        KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS Normal forward keyboard traversal TAB on KEY_PRESSED, CTRL-TAB on KEY_PRESSED
        KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS Normal reverse keyboard traversal SHIFT-TAB on KEY_PRESSED, CTRL-SHIFT-TAB on KEY_PRESSED
        KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS Go up one focus traversal cycle none
        KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS Go down one focus traversal cycle none
        To disable a traversal key, use an empty Set; Collections.EMPTY_SET is recommended.

        Using the AWTKeyStroke API, client code can specify on which of two specific KeyEvents, KEY_PRESSED or KEY_RELEASED, the focus traversal operation will occur. Regardless of which KeyEvent is specified, however, all KeyEvents related to the focus traversal key, including the associated KEY_TYPED event, will be consumed, and will not be dispatched to any Container. It is a runtime error to specify a KEY_TYPED event as mapping to a focus traversal operation, or to map the same event to multiple default focus traversal operations.

        If a value of null is specified for the Set, this Container inherits the Set from its parent. If all ancestors of this Container have null specified for the Set, then the current KeyboardFocusManager's default Set is used.

        Overrides:
        setFocusTraversalKeys in class Component
        Parameters:
        id - one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
        keystrokes - the Set of AWTKeyStroke for the specified operation
        Throws:
        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, or if keystrokes contains null, or if any Object in keystrokes is not an AWTKeyStroke, or if any keystroke represents a KEY_TYPED event, or if any keystroke already maps to another focus traversal operation for this Container
        Since:
        1.4
        See Also:
        Container.getFocusTraversalKeys(int), KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
        Inherited member indicator setFocusTraversalKeysEnabled Reveal DetailHide Detail
        void setFocusTraversalKeysEnabled(boolean focusTraversalKeysEnabled)
        Sets whether focus traversal keys are enabled for this Component.
        public void setFocusTraversalKeysEnabled(boolean focusTraversalKeysEnabled)
        Description copied from class: Component
        Sets whether focus traversal keys are enabled for this Component. Components for which focus traversal keys are disabled receive key events for focus traversal keys. Components for which focus traversal keys are enabled do not see these events; instead, the events are automatically converted to traversal operations.
        Parameters:
        focusTraversalKeysEnabled - whether focus traversal keys are enabled for this Component
        Since:
        1.4
        See Also:
        Component.getFocusTraversalKeysEnabled(), Component.setFocusTraversalKeys(int, java.util.Set<? extends java.awt.AWTKeyStroke>), Component.getFocusTraversalKeys(int)
        Inherited member indicator setFocusTraversalPolicy Reveal DetailHide Detail
        void setFocusTraversalPolicy(FocusTraversalPolicy policy)
        Sets the focus traversal policy that will manage keyboard traversal of this Container's children, if this Container is a focus cycle root.
        public void setFocusTraversalPolicy(FocusTraversalPolicy policy)
        Description copied from class: Container
        Sets the focus traversal policy that will manage keyboard traversal of this Container's children, if this Container is a focus cycle root. If the argument is null, this Container inherits its policy from its focus- cycle-root ancestor. If the argument is non-null, this policy will be inherited by all focus-cycle-root children that have no keyboard- traversal policy of their own (as will, recursively, their focus-cycle- root children).

        If this Container is not a focus cycle root, the policy will be remembered, but will not be used or inherited by this or any other Containers until this Container is made a focus cycle root.

        Parameters:
        policy - the new focus traversal policy for this Container
        Since:
        1.4
        See Also:
        Container.getFocusTraversalPolicy(), Container.setFocusCycleRoot(boolean), Container.isFocusCycleRoot(java.awt.Container)
        Inherited member indicator setFocusTraversalPolicyProvider Reveal DetailHide Detail
        void setFocusTraversalPolicyProvider(boolean provider)
        Sets whether this container will be used to provide focus traversal policy.
        public final void setFocusTraversalPolicyProvider(boolean provider)
        Description copied from class: Container
        Sets whether this container will be used to provide focus traversal policy. Container with this property as true will be used to acquire focus traversal policy instead of closest focus cycle root ancestor.
        Parameters:
        provider - indicates whether this container will be used to provide focus traversal policy
        Since:
        1.5
        See Also:
        Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy), Container.getFocusTraversalPolicy(), Container.isFocusTraversalPolicyProvider()
        Inherited member indicator transferFocus Reveal DetailHide Detail
        void transferFocus()
        Transfers the focus to the next component, as though this Component were the focus owner.
        public void transferFocus()
        Description copied from class: Component
        Transfers the focus to the next component, as though this Component were the focus owner.
        Since:
        JDK1.1
        See Also:
        Component.requestFocus()
        Inherited member indicator transferFocusBackward Reveal DetailHide Detail
        void transferFocusBackward()
        Transfers the focus to the previous component, as though this Component were the focus owner.
        public void transferFocusBackward()
        Description copied from class: Component
        Transfers the focus to the previous component, as though this Component were the focus owner.
        Since:
        1.4
        See Also:
        Component.requestFocus()
        Inherited member indicator transferFocusDownCycle Reveal DetailHide Detail
        void transferFocusDownCycle()
        Transfers the focus down one focus traversal cycle.
        public void transferFocusDownCycle()
        Description copied from class: Container
        Transfers the focus down one focus traversal cycle. If this Container is a focus cycle root, then the focus owner is set to this Container's default Component to focus, and the current focus cycle root is set to this Container. If this Container is not a focus cycle root, then no focus traversal operation occurs.
        Since:
        1.4
        See Also:
        Component.requestFocus(), Container.isFocusCycleRoot(java.awt.Container), Container.setFocusCycleRoot(boolean)
        Inherited member indicator transferFocusUpCycle Reveal DetailHide Detail
        void transferFocusUpCycle()
        Transfers the focus up one focus traversal cycle.
        public void transferFocusUpCycle()
        Description copied from class: Component
        Transfers the focus up one focus traversal cycle. Typically, the focus owner is set to this Component's focus cycle root, and the current focus cycle root is set to the new focus owner's focus cycle root. If, however, this Component's focus cycle root is a Window, then the focus owner is set to the focus cycle root's default Component to focus, and the current focus cycle root is unchanged.
        Since:
        1.4
        See Also:
        Component.requestFocus(), Container.isFocusCycleRoot(), Container.setFocusCycleRoot(boolean)
      • Graphics Methods 
        Modifier and Type Method and Description
        Inherited member indicator getFontMetrics Reveal DetailHide Detail
        FontMetrics getFontMetrics(Font font)
        Gets the font metrics for the specified font.
        public FontMetrics getFontMetrics(Font font)
        Description copied from class: Component
        Gets the font metrics for the specified font. Warning: Since Font metrics are affected by the FontRenderContext and this method does not provide one, it can return only metrics for the default render context which may not match that used when rendering on the Component if Graphics2D functionality is being used. Instead metrics can be obtained at rendering time by calling Graphics.getFontMetrics() or text measurement APIs on the Font class.
        Parameters:
        font - the font for which font metrics is to be obtained
        Returns:
        the font metrics for font
        Since:
        JDK1.0
        See Also:
        Component.getFont(), Component.getPeer(), ComponentPeer.getFontMetrics(Font), Toolkit.getFontMetrics(Font)
        Inherited member indicator getGraphics Reveal DetailHide Detail
        Graphics getGraphics()
        Creates a graphics context for this component.
        public Graphics getGraphics()
        Description copied from class: Component
        Creates a graphics context for this component. This method will return null if this component is currently not displayable.
        Returns:
        a graphics context for this component, or null if it has none
        Since:
        JDK1.0
        See Also:
        Component.paint(java.awt.Graphics)
        Inherited member indicator getGraphicsConfiguration Reveal DetailHide Detail
        GraphicsConfiguration getGraphicsConfiguration()
        Gets the GraphicsConfiguration associated with this Component.
        public GraphicsConfiguration getGraphicsConfiguration()
        Description copied from class: Component
        Gets the GraphicsConfiguration associated with this Component. If the Component has not been assigned a specific GraphicsConfiguration, the GraphicsConfiguration of the Component object's top-level container is returned. If the Component has been created, but not yet added to a Container, this method returns null.
        Returns:
        the GraphicsConfiguration used by this Component or null
        Since:
        1.3
        Inherited member indicator getLocationOnScreen Reveal DetailHide Detail
        Point getLocationOnScreen()
        Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.
        public Point getLocationOnScreen()
        Description copied from class: Component
        Gets the location of this component in the form of a point specifying the component's top-left corner in the screen's coordinate space.
        Returns:
        an instance of Point representing the top-left corner of the component's bounds in the coordinate space of the screen
        Throws:
        IllegalComponentStateException - if the component is not showing on the screen
        See Also:
        Component.setLocation(int, int), Component.getLocation()
        Inherited member indicator getMousePosition Reveal DetailHide Detail
        Point getMousePosition()
        Returns the position of the mouse pointer in this Component's coordinate space if the Component is directly under the mouse pointer, otherwise returns null.
        public Point getMousePosition() throws HeadlessException
        Description copied from class: Component
        Returns the position of the mouse pointer in this Component's coordinate space if the Component is directly under the mouse pointer, otherwise returns null. If the Component is not showing on the screen, this method returns null even if the mouse pointer is above the area where the Component would be displayed. If the Component is partially or fully obscured by other Components or native windows, this method returns a non-null value only if the mouse pointer is located above the unobscured part of the Component.

        For Containers it returns a non-null value if the mouse is above the Container itself or above any of its descendants. Use Container.getMousePosition(boolean) if you need to exclude children.

        Sometimes the exact mouse coordinates are not important, and the only thing that matters is whether a specific Component is under the mouse pointer. If the return value of this method is null, mouse pointer is not directly above the Component.

        Returns:
        mouse coordinates relative to this Component, or null
        Throws:
        HeadlessException - if GraphicsEnvironment.isHeadless() returns true
        Since:
        1.5
        See Also:
        Component.isShowing(), Container.getMousePosition(boolean)
        Overridden member indicator getToolkit Reveal DetailHide Detail
        Toolkit getToolkit()
        Returns the toolkit of this frame.
        public Toolkit getToolkit()
        Returns the toolkit of this frame.
        Overrides:
        getToolkit in class Component
        Returns:
        the toolkit of this window.
        See Also:
        Toolkit, Toolkit.getDefaultToolkit(), Component.getToolkit()
      • Hierarchy Methods 
        Modifier and Type Method and Description
        Inherited member indicator add Reveal DetailHide Detail
        Component add(Component comp)
        Appends the specified component to the end of this container.
        public Component add(Component comp)
        Description copied from class: Container
        Appends the specified component to the end of this container. This is a convenience method for Container.addImpl(java.awt.Component, java.lang.Object, int).

        This method changes layout-related information, and therefore, invalidates the component hierarchy. If the container has already been displayed, the hierarchy must be validated thereafter in order to display the added component.

        Parameters:
        comp - the component to be added
        Returns:
        the component argument
        Throws:
        java.lang.NullPointerException - if comp is null
        See Also:
        Container.addImpl(java.awt.Component, java.lang.Object, int), Container.invalidate(), Container.validate(), JComponent.revalidate()
        Inherited member indicator add Reveal DetailHide Detail
        Component add(Component comp, int index)
        Adds the specified component to this container at the given position.
        public Component add(Component comp, int index)
        Description copied from class: Container
        Adds the specified component to this container at the given position. This is a convenience method for Container.addImpl(java.awt.Component, java.lang.Object, int).

        This method changes layout-related information, and therefore, invalidates the component hierarchy. If the container has already been displayed, the hierarchy must be validated thereafter in order to display the added component.

        Parameters:
        comp - the component to be added
        index - the position at which to insert the component, or -1 to append the component to the end
        Returns:
        the component comp
        Throws:
        java.lang.NullPointerException - if comp is null
        java.lang.IllegalArgumentException - if index is invalid (see Container.addImpl(java.awt.Component, java.lang.Object, int) for details)
        See Also:
        Container.addImpl(java.awt.Component, java.lang.Object, int), Container.remove(int), Container.invalidate(), Container.validate(), JComponent.revalidate()
        Inherited member indicator add Reveal DetailHide Detail
        void add(Component comp, java.lang.Object constraints)
        Adds the specified component to the end of this container.
        public void add(Component comp, java.lang.Object constraints)
        Description copied from class: Container
        Adds the specified component to the end of this container. Also notifies the layout manager to add the component to this container's layout using the specified constraints object. This is a convenience method for Container.addImpl(java.awt.Component, java.lang.Object, int).

        This method changes layout-related information, and therefore, invalidates the component hierarchy. If the container has already been displayed, the hierarchy must be validated thereafter in order to display the added component.

        Parameters:
        comp - the component to be added
        constraints - an object expressing layout contraints for this component
        Throws:
        java.lang.NullPointerException - if comp is null
        Since:
        JDK1.1
        See Also:
        Container.addImpl(java.awt.Component, java.lang.Object, int), Container.invalidate(), Container.validate(), JComponent.revalidate(), LayoutManager
        Inherited member indicator add Reveal DetailHide Detail
        void add(Component comp, java.lang.Object constraints, int index)
        Adds the specified component to this container with the specified constraints at the specified index.
        public void add(Component comp, java.lang.Object constraints, int index)
        Description copied from class: Container
        Adds the specified component to this container with the specified constraints at the specified index. Also notifies the layout manager to add the component to the this container's layout using the specified constraints object. This is a convenience method for Container.addImpl(java.awt.Component, java.lang.Object, int).

        This method changes layout-related information, and therefore, invalidates the component hierarchy. If the container has already been displayed, the hierarchy must be validated thereafter in order to display the added component.

        Parameters:
        comp - the component to be added
        constraints - an object expressing layout contraints for this
        index - the position in the container's list at which to insert the component; -1 means insert at the end component
        Throws:
        java.lang.NullPointerException - if comp is null
        java.lang.IllegalArgumentException - if index is invalid (see Container.addImpl(java.awt.Component, java.lang.Object, int) for details)
        See Also:
        Container.addImpl(java.awt.Component, java.lang.Object, int), Container.invalidate(), Container.validate(), JComponent.revalidate(), Container.remove(int), LayoutManager
        Inherited member indicator add Reveal DetailHide Detail
        Component add(java.lang.String name, Component comp)
        Adds the specified component to this container.
        public Component add(java.lang.String name, Component comp)
        Description copied from class: Container
        Adds the specified component to this container. This is a convenience method for Container.addImpl(java.awt.Component, java.lang.Object, int).

        This method is obsolete as of 1.1. Please use the method add(Component, Object) instead.

        This method changes layout-related information, and therefore, invalidates the component hierarchy. If the container has already been displayed, the hierarchy must be validated thereafter in order to display the added component.

        Throws:
        java.lang.NullPointerException - if comp is null
        See Also:
        Container.add(Component, Object), Container.invalidate()
        Inherited member indicator addImpl Reveal DetailHide Detail
        protected void addImpl(Component comp, java.lang.Object constraints, int index)
        Adds the specified component to this container at the specified index.
        protected void addImpl(Component comp, java.lang.Object constraints, int index)
        Description copied from class: Container
        Adds the specified component to this container at the specified index. This method also notifies the layout manager to add the component to this container's layout using the specified constraints object via the addLayoutComponent method.

        The constraints are defined by the particular layout manager being used. For example, the BorderLayout class defines five constraints: BorderLayout.NORTH, BorderLayout.SOUTH, BorderLayout.EAST, BorderLayout.WEST, and BorderLayout.CENTER.

        The GridBagLayout class requires a GridBagConstraints object. Failure to pass the correct type of constraints object results in an IllegalArgumentException.

        If the current layout manager implements LayoutManager2, then LayoutManager2.addLayoutComponent(Component,Object) is invoked on it. If the current layout manager does not implement LayoutManager2, and constraints is a String, then LayoutManager.addLayoutComponent(String,Component) is invoked on it.

        If the component is not an ancestor of this container and has a non-null parent, it is removed from its current parent before it is added to this container.

        This is the method to override if a program needs to track every add request to a container as all other add methods defer to this one. An overriding method should usually include a call to the superclass's version of the method:

        super.addImpl(comp, constraints, index)

        This method changes layout-related information, and therefore, invalidates the component hierarchy. If the container has already been displayed, the hierarchy must be validated thereafter in order to display the added component.

        Parameters:
        comp - the component to be added
        constraints - an object expressing layout constraints for this component
        index - the position in the container's list at which to insert the component, where -1 means append to the end
        Throws:
        java.lang.IllegalArgumentException - if index is invalid; if comp is a child of this container, the valid range is [-1, getComponentCount()-1]; if component is not a child of this container, the valid range is [-1, getComponentCount()]
        java.lang.IllegalArgumentException - if comp is an ancestor of this container
        java.lang.IllegalArgumentException - if adding a window to a container
        java.lang.NullPointerException - if comp is null
        Since:
        JDK1.1
        See Also:
        Container.add(Component), Container.add(Component, int), Container.add(Component, java.lang.Object), Container.invalidate(), LayoutManager, LayoutManager2
        Inherited member indicator countComponents Reveal DetailHide Detail
        int countComponents()
        Deprecated. As of JDK version 1.1, replaced by getComponentCount().
        @Deprecated public int countComponents()
        Deprecated. As of JDK version 1.1, replaced by getComponentCount().
        Inherited member indicator getComponent Reveal DetailHide Detail
        Component getComponent(int n)
        Gets the nth component in this container.
        public Component getComponent(int n)
        Description copied from class: Container
        Gets the nth component in this container.

        Note: This method should be called under AWT tree lock.

        Parameters:
        n - the index of the component to get.
        Returns:
        the nth component in this container.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if the nth value does not exist.
        See Also:
        Component.getTreeLock()
        Inherited member indicator getComponentCount Reveal DetailHide Detail
        int getComponentCount()
        Gets the number of components in this panel.
        public int getComponentCount()
        Description copied from class: Container
        Gets the number of components in this panel.

        Note: This method should be called under AWT tree lock.

        Returns:
        the number of components in this panel.
        Since:
        JDK1.1
        See Also:
        Container.getComponent(int), Component.getTreeLock()
        Inherited member indicator getComponents Reveal DetailHide Detail
        Component[] getComponents()
        Gets all the components in this container.
        public Component[] getComponents()
        Description copied from class: Container
        Gets all the components in this container.

        Note: This method should be called under AWT tree lock.

        Returns:
        an array of all the components in this container.
        See Also:
        Component.getTreeLock()
        Inherited member indicator getComponentZOrder Reveal DetailHide Detail
        int getComponentZOrder(Component comp)
        Returns the z-order index of the component inside the container.
        public int getComponentZOrder(Component comp)
        Description copied from class: Container
        Returns the z-order index of the component inside the container. The higher a component is in the z-order hierarchy, the lower its index. The component with the lowest z-order index is painted last, above all other child components.
        Parameters:
        comp - the component being queried
        Returns:
        the z-order index of the component; otherwise returns -1 if the component is null or doesn't belong to the container
        Since:
        1.5
        See Also:
        Container.setComponentZOrder(java.awt.Component, int)
        Inherited member indicator isAncestorOf Reveal DetailHide Detail
        boolean isAncestorOf(Component c)
        Checks if the component is contained in the component hierarchy of this container.
        public boolean isAncestorOf(Component c)
        Description copied from class: Container
        Checks if the component is contained in the component hierarchy of this container.
        Parameters:
        c - the component
        Returns:
        true if it is an ancestor; false otherwise.
        Since:
        JDK1.1
        Inherited member indicator remove Reveal DetailHide Detail
        void remove(Component comp)
        Removes the specified component from this container.
        public void remove(Component comp)
        Description copied from class: Container
        Removes the specified component from this container. This method also notifies the layout manager to remove the component from this container's layout via the removeLayoutComponent method.

        This method changes layout-related information, and therefore, invalidates the component hierarchy. If the container has already been displayed, the hierarchy must be validated thereafter in order to reflect the changes.

        Parameters:
        comp - the component to be removed
        Throws:
        java.lang.NullPointerException - if comp is null
        See Also:
        Container.add(java.awt.Component), Container.invalidate(), Container.validate(), Container.remove(int)
        Inherited member indicator remove Reveal DetailHide Detail
        void remove(int index)
        Removes the component, specified by index, from this container.
        public void remove(int index)
        Description copied from class: Container
        Removes the component, specified by index, from this container. This method also notifies the layout manager to remove the component from this container's layout via the removeLayoutComponent method.

        This method changes layout-related information, and therefore, invalidates the component hierarchy. If the container has already been displayed, the hierarchy must be validated thereafter in order to reflect the changes.

        Parameters:
        index - the index of the component to be removed
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if index is not in range [0, getComponentCount()-1]
        Since:
        JDK1.1
        See Also:
        Container.add(java.awt.Component), Container.invalidate(), Container.validate(), Container.getComponentCount()
        Inherited member indicator removeAll Reveal DetailHide Detail
        void removeAll()
        Removes all the components from this container.
        public void removeAll()
        Description copied from class: Container
        Removes all the components from this container. This method also notifies the layout manager to remove the components from this container's layout via the removeLayoutComponent method.

        This method changes layout-related information, and therefore, invalidates the component hierarchy. If the container has already been displayed, the hierarchy must be validated thereafter in order to reflect the changes.

        See Also:
        Container.add(java.awt.Component), Container.remove(int), Container.invalidate()
        Inherited member indicator setComponentZOrder Reveal DetailHide Detail
        void setComponentZOrder(Component comp, int index)
        Moves the specified component to the specified z-order index in the container.
        public void setComponentZOrder(Component comp, int index)
        Description copied from class: Container
        Moves the specified component to the specified z-order index in the container. The z-order determines the order that components are painted; the component with the highest z-order paints first and the component with the lowest z-order paints last. Where components overlap, the component with the lower z-order paints over the component with the higher z-order.

        If the component is a child of some other container, it is removed from that container before being added to this container. The important difference between this method and java.awt.Container.add(Component, int) is that this method doesn't call removeNotify on the component while removing it from its previous container unless necessary and when allowed by the underlying native windowing system. This way, if the component has the keyboard focus, it maintains the focus when moved to the new position.

        This property is guaranteed to apply only to lightweight non-Container components.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        Note: Not all platforms support changing the z-order of heavyweight components from one container into another without the call to removeNotify. There is no way to detect whether a platform supports this, so developers shouldn't make any assumptions.

        Parameters:
        comp - the component to be moved
        index - the position in the container's list to insert the component, where getComponentCount() appends to the end
        Throws:
        java.lang.NullPointerException - if comp is null
        java.lang.IllegalArgumentException - if comp is one of the container's parents
        java.lang.IllegalArgumentException - if index is not in the range [0, getComponentCount()] for moving between containers, or not in the range [0, getComponentCount()-1] for moving inside a container
        java.lang.IllegalArgumentException - if adding a container to itself
        java.lang.IllegalArgumentException - if adding a Window to a container
        Since:
        1.5
        See Also:
        Container.getComponentZOrder(java.awt.Component), Container.invalidate()
      • Image Methods 
        Modifier and Type Method and Description
        Inherited member indicator checkImage Reveal DetailHide Detail
        int checkImage(Image image, java.awt.image.ImageObserver observer)
        Returns the status of the construction of a screen representation of the specified image.
        public int checkImage(Image image, java.awt.image.ImageObserver observer)
        Description copied from class: Component
        Returns the status of the construction of a screen representation of the specified image.

        This method does not cause the image to begin loading. An application must use the prepareImage method to force the loading of an image.

        Information on the flags returned by this method can be found with the discussion of the ImageObserver interface.

        Parameters:
        image - the Image object whose status is being checked
        observer - the ImageObserver object to be notified as the image is being prepared
        Returns:
        the bitwise inclusive OR of ImageObserver flags indicating what information about the image is currently available
        Since:
        JDK1.0
        See Also:
        Component.prepareImage(Image, int, int, java.awt.image.ImageObserver), Toolkit.checkImage(Image, int, int, java.awt.image.ImageObserver), ImageObserver
        Inherited member indicator checkImage Reveal DetailHide Detail
        int checkImage(Image image, int width, int height, java.awt.image.ImageObserver observer)
        Returns the status of the construction of a screen representation of the specified image.
        public int checkImage(Image image, int width, int height, java.awt.image.ImageObserver observer)
        Description copied from class: Component
        Returns the status of the construction of a screen representation of the specified image.

        This method does not cause the image to begin loading. An application must use the prepareImage method to force the loading of an image.

        The checkImage method of Component calls its peer's checkImage method to calculate the flags. If this component does not yet have a peer, the component's toolkit's checkImage method is called instead.

        Information on the flags returned by this method can be found with the discussion of the ImageObserver interface.

        Parameters:
        image - the Image object whose status is being checked
        width - the width of the scaled version whose status is to be checked
        height - the height of the scaled version whose status is to be checked
        observer - the ImageObserver object to be notified as the image is being prepared
        Returns:
        the bitwise inclusive OR of ImageObserver flags indicating what information about the image is currently available
        Since:
        JDK1.0
        See Also:
        Component.prepareImage(Image, int, int, java.awt.image.ImageObserver), Toolkit.checkImage(Image, int, int, java.awt.image.ImageObserver), ImageObserver
        Inherited member indicator createImage Reveal DetailHide Detail
        Image createImage(java.awt.image.ImageProducer producer)
        Creates an image from the specified image producer.
        public Image createImage(java.awt.image.ImageProducer producer)
        Description copied from class: Component
        Creates an image from the specified image producer.
        Parameters:
        producer - the image producer
        Returns:
        the image produced
        Since:
        JDK1.0
        Inherited member indicator createImage Reveal DetailHide Detail
        Image createImage(int width, int height)
        Creates an off-screen drawable image to be used for double buffering.
        public Image createImage(int width, int height)
        Description copied from class: Component
        Creates an off-screen drawable image to be used for double buffering.
        Parameters:
        width - the specified width
        height - the specified height
        Returns:
        an off-screen drawable image, which can be used for double buffering. The return value may be null if the component is not displayable. This will always happen if GraphicsEnvironment.isHeadless() returns true.
        Since:
        JDK1.0
        See Also:
        Component.isDisplayable(), GraphicsEnvironment.isHeadless()
        Inherited member indicator createVolatileImage Reveal DetailHide Detail
        java.awt.image.VolatileImage createVolatileImage(int width, int height)
        Creates a volatile off-screen drawable image to be used for double buffering.
        public java.awt.image.VolatileImage createVolatileImage(int width, int height)
        Description copied from class: Component
        Creates a volatile off-screen drawable image to be used for double buffering.
        Parameters:
        width - the specified width.
        height - the specified height.
        Returns:
        an off-screen drawable image, which can be used for double buffering. The return value may be null if the component is not displayable. This will always happen if GraphicsEnvironment.isHeadless() returns true.
        Since:
        1.4
        See Also:
        VolatileImage, Component.isDisplayable(), GraphicsEnvironment.isHeadless()
        Inherited member indicator createVolatileImage Reveal DetailHide Detail
        java.awt.image.VolatileImage createVolatileImage(int width, int height, ImageCapabilities caps)
        Creates a volatile off-screen drawable image, with the given capabilities.
        public java.awt.image.VolatileImage createVolatileImage(int width, int height, ImageCapabilities caps) throws AWTException
        Description copied from class: Component
        Creates a volatile off-screen drawable image, with the given capabilities. The contents of this image may be lost at any time due to operating system issues, so the image must be managed via the VolatileImage interface.
        Parameters:
        width - the specified width.
        height - the specified height.
        caps - the image capabilities
        Returns:
        a VolatileImage object, which can be used to manage surface contents loss and capabilities.
        Throws:
        AWTException - if an image with the specified capabilities cannot be created
        Since:
        1.4
        See Also:
        VolatileImage
        Inherited member indicator imageUpdate Reveal DetailHide Detail
        boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h)
        Repaints the component when the image has changed.
        public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h)
        Description copied from class: Component
        Repaints the component when the image has changed. This imageUpdate method of an ImageObserver is called when more information about an image which had been previously requested using an asynchronous routine such as the drawImage method of Graphics becomes available. See the definition of imageUpdate for more information on this method and its arguments.

        The imageUpdate method of Component incrementally draws an image on the component as more of the bits of the image are available.

        If the system property awt.image.incrementaldraw is missing or has the value true, the image is incrementally drawn. If the system property has any other value, then the image is not drawn until it has been completely loaded.

        Also, if incremental drawing is in effect, the value of the system property awt.image.redrawrate is interpreted as an integer to give the maximum redraw rate, in milliseconds. If the system property is missing or cannot be interpreted as an integer, the redraw rate is once every 100ms.

        The interpretation of the x, y, width, and height arguments depends on the value of the infoflags argument.

        Specified by:
        imageUpdate in interface java.awt.image.ImageObserver
        Parameters:
        img - the image being observed
        infoflags - see imageUpdate for more information
        x - the x coordinate
        y - the y coordinate
        w - the width
        h - the height
        Returns:
        false if the infoflags indicate that the image is completely loaded; true otherwise.
        Since:
        JDK1.0
        See Also:
        ImageObserver, Graphics.drawImage(Image, int, int, Color, java.awt.image.ImageObserver), Graphics.drawImage(Image, int, int, java.awt.image.ImageObserver), Graphics.drawImage(Image, int, int, int, int, Color, java.awt.image.ImageObserver), Graphics.drawImage(Image, int, int, int, int, java.awt.image.ImageObserver), ImageObserver.imageUpdate(java.awt.Image, int, int, int, int, int)
        Inherited member indicator prepareImage Reveal DetailHide Detail
        boolean prepareImage(Image image, java.awt.image.ImageObserver observer)
        Prepares an image for rendering on this component.
        public boolean prepareImage(Image image, java.awt.image.ImageObserver observer)
        Description copied from class: Component
        Prepares an image for rendering on this component. The image data is downloaded asynchronously in another thread and the appropriate screen representation of the image is generated.
        Parameters:
        image - the Image for which to prepare a screen representation
        observer - the ImageObserver object to be notified as the image is being prepared
        Returns:
        true if the image has already been fully prepared; false otherwise
        Since:
        JDK1.0
        Inherited member indicator prepareImage Reveal DetailHide Detail
        boolean prepareImage(Image image, int width, int height, java.awt.image.ImageObserver observer)
        Prepares an image for rendering on this component at the specified width and height.
        public boolean prepareImage(Image image, int width, int height, java.awt.image.ImageObserver observer)
        Description copied from class: Component
        Prepares an image for rendering on this component at the specified width and height.

        The image data is downloaded asynchronously in another thread, and an appropriately scaled screen representation of the image is generated.

        Parameters:
        image - the instance of Image for which to prepare a screen representation
        width - the width of the desired screen representation
        height - the height of the desired screen representation
        observer - the ImageObserver object to be notified as the image is being prepared
        Returns:
        true if the image has already been fully prepared; false otherwise
        Since:
        JDK1.0
        See Also:
        ImageObserver
      • Layout Methods 
        Modifier and Type Method and Description
        Inherited member indicator bounds Reveal DetailHide Detail
        Rectangle bounds()
        Deprecated. As of JDK version 1.1, replaced by getBounds().
        @Deprecated public Rectangle bounds()
        Deprecated. As of JDK version 1.1, replaced by getBounds().
        Inherited member indicator contains Reveal DetailHide Detail
        boolean contains(int x, int y)
        Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
        public boolean contains(int x, int y)
        Description copied from class: Component
        Checks whether this component "contains" the specified point, where x and y are defined to be relative to the coordinate system of this component.
        Parameters:
        x - the x coordinate of the point
        y - the y coordinate of the point
        Since:
        JDK1.1
        See Also:
        Component.getComponentAt(int, int)
        Inherited member indicator contains Reveal DetailHide Detail
        boolean contains(Point p)
        Checks whether this component "contains" the specified point, where the point's x and y coordinates are defined to be relative to the coordinate system of this component.
        public boolean contains(Point p)
        Description copied from class: Component
        Checks whether this component "contains" the specified point, where the point's x and y coordinates are defined to be relative to the coordinate system of this component.
        Parameters:
        p - the point
        Throws:
        java.lang.NullPointerException - if p is null
        Since:
        JDK1.1
        See Also:
        Component.getComponentAt(Point)
        Inherited member indicator doLayout Reveal DetailHide Detail
        void doLayout()
        Causes this container to lay out its components.
        public void doLayout()
        Description copied from class: Container
        Causes this container to lay out its components. Most programs should not call this method directly, but should invoke the validate method instead.
        Overrides:
        doLayout in class Component
        Since:
        JDK1.1
        See Also:
        LayoutManager.layoutContainer(java.awt.Container), Container.setLayout(java.awt.LayoutManager), Container.validate()
        Inherited member indicator findComponentAt Reveal DetailHide Detail
        Component findComponentAt(int x, int y)
        Locates the visible child component that contains the specified position.
        public Component findComponentAt(int x, int y)
        Description copied from class: Container
        Locates the visible child component that contains the specified position. The top-most child component is returned in the case where there is overlap in the components. If the containing child component is a Container, this method will continue searching for the deepest nested child component. Components which are not visible are ignored during the search.

        The findComponentAt method is different from getComponentAt in that getComponentAt only searches the Container's immediate children; if the containing component is a Container, findComponentAt will search that child to find a nested component.

        Parameters:
        x - the x coordinate
        y - the y coordinate
        Returns:
        null if the component does not contain the position. If there is no child component at the requested point and the point is within the bounds of the container the container itself is returned.
        Since:
        1.2
        See Also:
        Component.contains(int, int), Container.getComponentAt(int, int)
        Inherited member indicator findComponentAt Reveal DetailHide Detail
        Component findComponentAt(Point p)
        Locates the visible child component that contains the specified point.
        public Component findComponentAt(Point p)
        Description copied from class: Container
        Locates the visible child component that contains the specified point. The top-most child component is returned in the case where there is overlap in the components. If the containing child component is a Container, this method will continue searching for the deepest nested child component. Components which are not visible are ignored during the search.

        The findComponentAt method is different from getComponentAt in that getComponentAt only searches the Container's immediate children; if the containing component is a Container, findComponentAt will search that child to find a nested component.

        Parameters:
        p - the point.
        Returns:
        null if the component does not contain the position. If there is no child component at the requested point and the point is within the bounds of the container the container itself is returned.
        Throws:
        java.lang.NullPointerException - if p is null
        Since:
        1.2
        See Also:
        Component.contains(int, int), Container.getComponentAt(int, int)
        Inherited member indicator getAlignmentX Reveal DetailHide Detail
        float getAlignmentX()
        Returns the alignment along the x axis.
        public float getAlignmentX()
        Description copied from class: Container
        Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
        Overrides:
        getAlignmentX in class Component
        Inherited member indicator getAlignmentY Reveal DetailHide Detail
        float getAlignmentY()
        Returns the alignment along the y axis.
        public float getAlignmentY()
        Description copied from class: Container
        Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
        Overrides:
        getAlignmentY in class Component
        Inherited member indicator getBaseline Reveal DetailHide Detail
        int getBaseline(int width, int height)
        Returns the baseline.
        public int getBaseline(int width, int height)
        Description copied from class: Component
        Returns the baseline. The baseline is measured from the top of the component. This method is primarily meant for LayoutManagers to align components along their baseline. A return value less than 0 indicates this component does not have a reasonable baseline and that LayoutManagers should not align this component on its baseline.

        The default implementation returns -1. Subclasses that support baseline should override appropriately. If a value >= 0 is returned, then the component has a valid baseline for any size >= the minimum size and getBaselineResizeBehavior can be used to determine how the baseline changes with size.

        Parameters:
        width - the width to get the baseline for
        height - the height to get the baseline for
        Returns:
        the baseline or < 0 indicating there is no reasonable baseline
        Throws:
        java.lang.IllegalArgumentException - if width or height is < 0
        Since:
        1.6
        See Also:
        Component.getBaselineResizeBehavior(), FontMetrics
        Inherited member indicator getBaselineResizeBehavior Reveal DetailHide Detail
        Component.BaselineResizeBehavior getBaselineResizeBehavior()
        Returns an enum indicating how the baseline of the component changes as the size changes.
        public Component.BaselineResizeBehavior getBaselineResizeBehavior()
        Description copied from class: Component
        Returns an enum indicating how the baseline of the component changes as the size changes. This method is primarily meant for layout managers and GUI builders.

        The default implementation returns BaselineResizeBehavior.OTHER. Subclasses that have a baseline should override appropriately. Subclasses should never return null; if the baseline can not be calculated return BaselineResizeBehavior.OTHER. Callers should first ask for the baseline using getBaseline and if a value >= 0 is returned use this method. It is acceptable for this method to return a value other than BaselineResizeBehavior.OTHER even if getBaseline returns a value less than 0.

        Returns:
        an enum indicating how the baseline changes as the component size changes
        Since:
        1.6
        See Also:
        Component.getBaseline(int, int)
        Inherited member indicator getBounds Reveal DetailHide Detail
        Rectangle getBounds()
        Gets the bounds of this component in the form of a Rectangle object.
        public Rectangle getBounds()
        Description copied from class: Component
        Gets the bounds of this component in the form of a Rectangle object. The bounds specify this component's width, height, and location relative to its parent.
        Returns:
        a rectangle indicating this component's bounds
        See Also:
        Component.setBounds(int, int, int, int), Component.getLocation(), Component.getSize()
        Inherited member indicator getBounds Reveal DetailHide Detail
        Rectangle getBounds(Rectangle rv)
        Stores the bounds of this component into "return value" rv and return rv.
        public Rectangle getBounds(Rectangle rv)
        Description copied from class: Component
        Stores the bounds of this component into "return value" rv and return rv. If rv is null a new Rectangle is allocated. This version of getBounds is useful if the caller wants to avoid allocating a new Rectangle object on the heap.
        Parameters:
        rv - the return value, modified to the components bounds
        Returns:
        rv
        Inherited member indicator getComponentAt Reveal DetailHide Detail
        Component getComponentAt(int x, int y)
        Locates the component that contains the x,y position.
        public Component getComponentAt(int x, int y)
        Description copied from class: Container
        Locates the component that contains the x,y position. The top-most child component is returned in the case where there is overlap in the components. This is determined by finding the component closest to the index 0 that claims to contain the given point via Component.contains(), except that Components which have native peers take precedence over those which do not (i.e., lightweight Components).
        Overrides:
        getComponentAt in class Component
        Parameters:
        x - the x coordinate
        y - the y coordinate
        Returns:
        null if the component does not contain the position. If there is no child component at the requested point and the point is within the bounds of the container the container itself is returned; otherwise the top-most child is returned.
        Since:
        JDK1.1
        See Also:
        Component.contains(int, int)
        Inherited member indicator getComponentAt Reveal DetailHide Detail
        Component getComponentAt(Point p)
        Gets the component that contains the specified point.
        public Component getComponentAt(Point p)
        Description copied from class: Container
        Gets the component that contains the specified point.
        Overrides:
        getComponentAt in class Component
        Parameters:
        p - the point.
        Returns:
        returns the component that contains the point, or null if the component does not contain the point.
        Since:
        JDK1.1
        See Also:
        Component.contains(int, int)
        Inherited member indicator getHeight Reveal DetailHide Detail
        int getHeight()
        Returns the current height of this component.
        public int getHeight()
        Description copied from class: Component
        Returns the current height of this component. This method is preferable to writing component.getBounds().height, or component.getSize().height because it doesn't cause any heap allocations.
        Returns:
        the current height of this component
        Since:
        1.2
        Inherited member indicator getInsets Reveal DetailHide Detail
        Insets getInsets()
        Determines the insets of this container, which indicate the size of the container's border.
        public Insets getInsets()
        Description copied from class: Container
        Determines the insets of this container, which indicate the size of the container's border.

        A Frame object, for example, has a top inset that corresponds to the height of the frame's title bar.

        Returns:
        the insets of this container.
        Since:
        JDK1.1
        See Also:
        Insets, LayoutManager
        Inherited member indicator getLayout Reveal DetailHide Detail
        LayoutManager getLayout()
        Gets the layout manager for this container.
        public LayoutManager getLayout()
        Description copied from class: Container
        Gets the layout manager for this container.
        See Also:
        Container.doLayout(), Container.setLayout(java.awt.LayoutManager)
        Inherited member indicator getLocation Reveal DetailHide Detail
        Point getLocation()
        Gets the location of this component in the form of a point specifying the component's top-left corner.
        public Point getLocation()
        Description copied from class: Component
        Gets the location of this component in the form of a point specifying the component's top-left corner. The location will be relative to the parent's coordinate space.

        Due to the asynchronous nature of native event handling, this method can return outdated values (for instance, after several calls of setLocation() in rapid succession). For this reason, the recommended method of obtaining a component's position is within java.awt.event.ComponentListener.componentMoved(), which is called after the operating system has finished moving the component.

        Returns:
        an instance of Point representing the top-left corner of the component's bounds in the coordinate space of the component's parent
        Since:
        JDK1.1
        See Also:
        Component.setLocation(int, int), Component.getLocationOnScreen()
        Inherited member indicator getLocation Reveal DetailHide Detail
        Point getLocation(Point rv)
        Stores the x,y origin of this component into "return value" rv and return rv.
        public Point getLocation(Point rv)
        Description copied from class: Component
        Stores the x,y origin of this component into "return value" rv and return rv. If rv is null a new Point is allocated. This version of getLocation is useful if the caller wants to avoid allocating a new Point object on the heap.
        Parameters:
        rv - the return value, modified to the components location
        Returns:
        rv
        Inherited member indicator getMaximumSize Reveal DetailHide Detail
        Dimension getMaximumSize()
        Returns the maximum size of this container.
        public Dimension getMaximumSize()
        Description copied from class: Container
        Returns the maximum size of this container. If the maximum size has not been set explicitly by Component.setMaximumSize(Dimension) and the LayoutManager installed on this Container is an instance of LayoutManager2, then LayoutManager2.maximumLayoutSize(Container) is used to calculate the maximum size.

        Note: some implementations may cache the value returned from the LayoutManager2. Implementations that cache need not invoke maximumLayoutSize on the LayoutManager2 every time this method is invoked, rather the LayoutManager2 will only be queried after the Container becomes invalid.

        Overrides:
        getMaximumSize in class Component
        Returns:
        an instance of Dimension that represents the maximum size of this container.
        See Also:
        Container.getPreferredSize(), Container.getMinimumSize(), Container.getLayout(), LayoutManager2.maximumLayoutSize(Container), Component.getMaximumSize()
        Inherited member indicator getMinimumSize Reveal DetailHide Detail
        Dimension getMinimumSize()
        Returns the minimum size of this container.
        public Dimension getMinimumSize()
        Description copied from class: Container
        Returns the minimum size of this container. If the minimum size has not been set explicitly by Component.setMinimumSize(Dimension) and this Container has a non-null LayoutManager, then LayoutManager.minimumLayoutSize(Container) is used to calculate the minimum size.

        Note: some implementations may cache the value returned from the LayoutManager. Implementations that cache need not invoke minimumLayoutSize on the LayoutManager every time this method is invoked, rather the LayoutManager will only be queried after the Container becomes invalid.

        Overrides:
        getMinimumSize in class Component
        Returns:
        an instance of Dimension that represents the minimum size of this container.
        Since:
        JDK1.1
        See Also:
        Container.getPreferredSize(), Container.getMaximumSize(), Container.getLayout(), LayoutManager.minimumLayoutSize(Container), Component.getMinimumSize()
        Inherited member indicator getMousePosition Reveal DetailHide Detail
        Point getMousePosition(boolean allowChildren)
        Returns the position of the mouse pointer in this Container's coordinate space if the Container is under the mouse pointer, otherwise returns null.
        public Point getMousePosition(boolean allowChildren) throws HeadlessException
        Description copied from class: Container
        Returns the position of the mouse pointer in this Container's coordinate space if the Container is under the mouse pointer, otherwise returns null. This method is similar to Component.getMousePosition() with the exception that it can take the Container's children into account. If allowChildren is false, this method will return a non-null value only if the mouse pointer is above the Container directly, not above the part obscured by children. If allowChildren is true, this method returns a non-null value if the mouse pointer is above Container or any of its descendants.
        Parameters:
        allowChildren - true if children should be taken into account
        Returns:
        mouse coordinates relative to this Component, or null
        Throws:
        HeadlessException - if GraphicsEnvironment.isHeadless() returns true
        Since:
        1.5
        See Also:
        Component.getMousePosition()
        Inherited member indicator getPreferredSize Reveal DetailHide Detail
        Dimension getPreferredSize()
        Returns the preferred size of this container.
        public Dimension getPreferredSize()
        Description copied from class: Container
        Returns the preferred size of this container. If the preferred size has not been set explicitly by Component.setPreferredSize(Dimension) and this Container has a non-null LayoutManager, then LayoutManager.preferredLayoutSize(Container) is used to calculate the preferred size.

        Note: some implementations may cache the value returned from the LayoutManager. Implementations that cache need not invoke preferredLayoutSize on the LayoutManager every time this method is invoked, rather the LayoutManager will only be queried after the Container becomes invalid.

        Overrides:
        getPreferredSize in class Component
        Returns:
        an instance of Dimension that represents the preferred size of this container.
        See Also:
        Container.getMinimumSize(), Container.getMaximumSize(), Container.getLayout(), LayoutManager.preferredLayoutSize(Container), Component.getPreferredSize()
        Inherited member indicator getSize Reveal DetailHide Detail
        Dimension getSize()
        Returns the size of this component in the form of a Dimension object.
        public Dimension getSize()
        Description copied from class: Component
        Returns the size of this component in the form of a Dimension object. The height field of the Dimension object contains this component's height, and the width field of the Dimension object contains this component's width.
        Returns:
        a Dimension object that indicates the size of this component
        Since:
        JDK1.1
        See Also:
        Component.setSize(int, int)
        Inherited member indicator getSize Reveal DetailHide Detail
        Dimension getSize(Dimension rv)
        Stores the width/height of this component into "return value" rv and return rv.
        public Dimension getSize(Dimension rv)
        Description copied from class: Component
        Stores the width/height of this component into "return value" rv and return rv. If rv is null a new Dimension object is allocated. This version of getSize is useful if the caller wants to avoid allocating a new Dimension object on the heap.
        Parameters:
        rv - the return value, modified to the components size
        Returns:
        rv
        Inherited member indicator getWidth Reveal DetailHide Detail
        int getWidth()
        Returns the current width of this component.
        public int getWidth()
        Description copied from class: Component
        Returns the current width of this component. This method is preferable to writing component.getBounds().width, or component.getSize().width because it doesn't cause any heap allocations.
        Returns:
        the current width of this component
        Since:
        1.2
        Inherited member indicator getX Reveal DetailHide Detail
        int getX()
        Returns the current x coordinate of the components origin.
        public int getX()
        Description copied from class: Component
        Returns the current x coordinate of the components origin. This method is preferable to writing component.getBounds().x, or component.getLocation().x because it doesn't cause any heap allocations.
        Returns:
        the current x coordinate of the components origin
        Since:
        1.2
        Inherited member indicator getY Reveal DetailHide Detail
        int getY()
        Returns the current y coordinate of the components origin.
        public int getY()
        Description copied from class: Component
        Returns the current y coordinate of the components origin. This method is preferable to writing component.getBounds().y, or component.getLocation().y because it doesn't cause any heap allocations.
        Returns:
        the current y coordinate of the components origin
        Since:
        1.2
        Inherited member indicator insets Reveal DetailHide Detail
        Insets insets()
        Deprecated. As of JDK version 1.1, replaced by getInsets().
        @Deprecated public Insets insets()
        Deprecated. As of JDK version 1.1, replaced by getInsets().
        Inherited member indicator inside Reveal DetailHide Detail
        boolean inside(int x, int y)
        Deprecated. As of JDK version 1.1, replaced by contains(int, int).
        @Deprecated public boolean inside(int x, int y)
        Deprecated. As of JDK version 1.1, replaced by contains(int, int).
        Inherited member indicator invalidate Reveal DetailHide Detail
        void invalidate()
        Invalidates the container.
        public void invalidate()
        Description copied from class: Container
        Invalidates the container.

        If the LayoutManager installed on this container is an instance of the LayoutManager2 interface, then the LayoutManager2.invalidateLayout(Container) method is invoked on it supplying this Container as the argument.

        Afterwards this method marks this container invalid, and invalidates its ancestors. See the Component.invalidate() method for more details.

        Overrides:
        invalidate in class Component
        See Also:
        Container.validate(), Container.layout(), LayoutManager2
        Inherited member indicator isMaximumSizeSet Reveal DetailHide Detail
        boolean isMaximumSizeSet()
        Returns true if the maximum size has been set to a non-null value otherwise returns false.
        public boolean isMaximumSizeSet()
        Description copied from class: Component
        Returns true if the maximum size has been set to a non-null value otherwise returns false.
        Returns:
        true if maximumSize is non-null, false otherwise
        Since:
        1.5
        Inherited member indicator isMinimumSizeSet Reveal DetailHide Detail
        boolean isMinimumSizeSet()
        Returns whether or not setMinimumSize has been invoked with a non-null value.
        public boolean isMinimumSizeSet()
        Description copied from class: Component
        Returns whether or not setMinimumSize has been invoked with a non-null value.
        Returns:
        true if setMinimumSize has been invoked with a non-null value.
        Since:
        1.5
        Inherited member indicator isPreferredSizeSet Reveal DetailHide Detail
        boolean isPreferredSizeSet()
        Returns true if the preferred size has been set to a non-null value otherwise returns false.
        public boolean isPreferredSizeSet()
        Description copied from class: Component
        Returns true if the preferred size has been set to a non-null value otherwise returns false.
        Returns:
        true if setPreferredSize has been invoked with a non-null value.
        Since:
        1.5
        Inherited member indicator isValid Reveal DetailHide Detail
        boolean isValid()
        Determines whether this component is valid.
        public boolean isValid()
        Description copied from class: Component
        Determines whether this component is valid. A component is valid when it is correctly sized and positioned within its parent container and all its children are also valid. In order to account for peers' size requirements, components are invalidated before they are first shown on the screen. By the time the parent container is fully realized, all its components will be valid.
        Returns:
        true if the component is valid, false otherwise
        Since:
        JDK1.0
        See Also:
        Component.validate(), Component.invalidate()
        Overridden member indicator isValidateRoot Reveal DetailHide Detail
        boolean isValidateRoot()
        Indicates if this container is a validate root.
        public boolean isValidateRoot()
        Indicates if this container is a validate root.

        Window objects are the validate roots, and, therefore, they override this method to return true.

        Overrides:
        isValidateRoot in class Container
        Returns:
        true
        Since:
        1.7
        See Also:
        Container.isValidateRoot()
        Inherited member indicator layout Reveal DetailHide Detail
        void layout()
        Deprecated. As of JDK version 1.1, replaced by doLayout().
        @Deprecated public void layout()
        Deprecated. As of JDK version 1.1, replaced by doLayout().
        Inherited member indicator locate Reveal DetailHide Detail
        Component locate(int x, int y)
        Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
        @Deprecated public Component locate(int x, int y)
        Deprecated. As of JDK version 1.1, replaced by getComponentAt(int, int).
        Inherited member indicator location Reveal DetailHide Detail
        Point location()
        Deprecated. As of JDK version 1.1, replaced by getLocation().
        @Deprecated public Point location()
        Deprecated. As of JDK version 1.1, replaced by getLocation().
        Inherited member indicator minimumSize Reveal DetailHide Detail
        Dimension minimumSize()
        Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
        @Deprecated public Dimension minimumSize()
        Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
        Inherited member indicator move Reveal DetailHide Detail
        void move(int x, int y)
        Deprecated. As of JDK version 1.1, replaced by setLocation(int, int).
        @Deprecated public void move(int x, int y)
        Deprecated. As of JDK version 1.1, replaced by setLocation(int, int).
        Inherited member indicator preferredSize Reveal DetailHide Detail
        Dimension preferredSize()
        Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
        @Deprecated public Dimension preferredSize()
        Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
        Overridden member indicator reshape Reveal DetailHide Detail
        void reshape(int x, int y, int width, int height)
        Deprecated. As of JDK version 1.1, replaced by setBounds(int, int, int, int).
        @Deprecated public void reshape(int x, int y, int width, int height)
        Deprecated. As of JDK version 1.1, replaced by setBounds(int, int, int, int).
        Inherited member indicator resize Reveal DetailHide Detail
        void resize(Dimension d)
        Deprecated. As of JDK version 1.1, replaced by setSize(Dimension).
        @Deprecated public void resize(Dimension d)
        Deprecated. As of JDK version 1.1, replaced by setSize(Dimension).
        Inherited member indicator resize Reveal DetailHide Detail
        void resize(int width, int height)
        Deprecated. As of JDK version 1.1, replaced by setSize(int, int).
        @Deprecated public void resize(int width, int height)
        Deprecated. As of JDK version 1.1, replaced by setSize(int, int).
        Inherited member indicator revalidate Reveal DetailHide Detail
        void revalidate()
        Revalidates the component hierarchy up to the nearest validate root.
        public void revalidate()
        Description copied from class: Component
        Revalidates the component hierarchy up to the nearest validate root.

        This method first invalidates the component hierarchy starting from this component up to the nearest validate root. Afterwards, the component hierarchy is validated starting from the nearest validate root.

        This is a convenience method supposed to help application developers avoid looking for validate roots manually. Basically, it's equivalent to first calling the Component.invalidate() method on this component, and then calling the Component.validate() method on the nearest validate root.

        Since:
        1.7
        See Also:
        Container.isValidateRoot()
        Overridden member indicator setBounds Reveal DetailHide Detail
        void setBounds(int x, int y, int width, int height)
        Moves and resizes this component.
        public void setBounds(int x, int y, int width, int height)
        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.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        The width or height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize.

        The method changes the geometry-related data. Therefore, the native windowing system may ignore such requests, or it may modify the requested data, so that the Window object is placed and sized in a way that corresponds closely to the desktop settings.

        Overrides:
        setBounds in class 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.6
        See Also:
        Component.getBounds(), setLocation(int, int), setLocation(Point), setSize(int, int), setSize(Dimension), setMinimumSize(java.awt.Dimension), setLocationByPlatform(boolean), isLocationByPlatform()
        Overridden member indicator setBounds Reveal DetailHide Detail
        void setBounds(Rectangle r)
        Moves and resizes this component to conform to the new bounding rectangle r.
        public void setBounds(Rectangle r)
        Moves and resizes this component to conform to the new bounding rectangle r. This component's new position is specified by r.x and r.y, and its new size is specified by r.width and r.height

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        The r.width or r.height values will be automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize.

        The method changes the geometry-related data. Therefore, the native windowing system may ignore such requests, or it may modify the requested data, so that the Window object is placed and sized in a way that corresponds closely to the desktop settings.

        Overrides:
        setBounds in class Component
        Parameters:
        r - the new bounding rectangle for this component
        Since:
        1.6
        See Also:
        Component.getBounds(), setLocation(int, int), setLocation(Point), setSize(int, int), setSize(Dimension), setMinimumSize(java.awt.Dimension), setLocationByPlatform(boolean), isLocationByPlatform()
        Inherited member indicator setLayout Reveal DetailHide Detail
        void setLayout(LayoutManager mgr)
        Sets the layout manager for this container.
        public void setLayout(LayoutManager mgr)
        Description copied from class: Container
        Sets the layout manager for this container.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        Parameters:
        mgr - the specified layout manager
        See Also:
        Container.doLayout(), Container.getLayout(), Container.invalidate()
        Overridden member indicator setLocation Reveal DetailHide Detail
        void setLocation(int x, int y)
        Moves this component to a new location.
        public void setLocation(int x, int y)
        Moves this component to a new location. The top-left corner of the new location is specified by the x and y parameters in the coordinate space of this component's parent.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        The method changes the geometry-related data. Therefore, the native windowing system may ignore such requests, or it may modify the requested data, so that the Window object is placed and sized in a way that corresponds closely to the desktop settings.

        Overrides:
        setLocation in class Component
        Parameters:
        x - the x-coordinate of the new location's top-left corner in the parent's coordinate space
        y - the y-coordinate of the new location's top-left corner in the parent's coordinate space
        See Also:
        Component.getLocation(), Component.setBounds(int, int, int, int), Component.invalidate()
        Overridden member indicator setLocation Reveal DetailHide Detail
        void setLocation(Point p)
        Moves this component to a new location.
        public void setLocation(Point p)
        Moves this component to a new location. The top-left corner of the new location is specified by point p. Point p is given in the parent's coordinate space.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        The method changes the geometry-related data. Therefore, the native windowing system may ignore such requests, or it may modify the requested data, so that the Window object is placed and sized in a way that corresponds closely to the desktop settings.

        Overrides:
        setLocation in class Component
        Parameters:
        p - the point defining the top-left corner of the new location, given in the coordinate space of this component's parent
        See Also:
        Component.getLocation(), Component.setBounds(int, int, int, int), Component.invalidate()
        Inherited member indicator setMaximumSize Reveal DetailHide Detail
        void setMaximumSize(Dimension maximumSize)
        Sets the maximum size of this component to a constant value.
        public void setMaximumSize(Dimension maximumSize)
        Description copied from class: Component
        Sets the maximum size of this component to a constant value. Subsequent calls to getMaximumSize will always return this value. Setting the maximum size to null restores the default behavior.
        Parameters:
        maximumSize - a Dimension containing the desired maximum allowable size
        Since:
        1.5
        See Also:
        Component.getMaximumSize(), Component.isMaximumSizeSet()
        Overridden member indicator setMinimumSize Reveal DetailHide Detail
        void setMinimumSize(Dimension minimumSize)
        Sets the minimum size of this window to a constant value.
        public void setMinimumSize(Dimension minimumSize)
        Sets the minimum size of this window to a constant value. Subsequent calls to getMinimumSize will always return this value. If current window's size is less than minimumSize the size of the window is automatically enlarged to honor the minimum size.

        If the setSize or setBounds methods are called afterwards with a width or height less than that was specified by the setMinimumSize method the window is automatically enlarged to meet the minimumSize value. The minimumSize value also affects the behaviour of the pack method.

        The default behavior is restored by setting the minimum size parameter to the null value.

        Resizing operation may be restricted if the user tries to resize window below the minimumSize value. This behaviour is platform-dependent.

        Overrides:
        setMinimumSize in class Component
        Parameters:
        minimumSize - the new minimum size of this window
        Since:
        1.6
        See Also:
        Component.setMinimumSize(java.awt.Dimension), Container.getMinimumSize(), Component.isMinimumSizeSet(), setSize(Dimension), pack()
        Inherited member indicator setPreferredSize Reveal DetailHide Detail
        void setPreferredSize(Dimension preferredSize)
        Sets the preferred size of this component to a constant value.
        public void setPreferredSize(Dimension preferredSize)
        Description copied from class: Component
        Sets the preferred size of this component to a constant value. Subsequent calls to getPreferredSize will always return this value. Setting the preferred size to null restores the default behavior.
        Parameters:
        preferredSize - The new preferred size, or null
        Since:
        1.5
        See Also:
        Component.getPreferredSize(), Component.isPreferredSizeSet()
        Overridden member indicator setSize Reveal DetailHide Detail
        void setSize(Dimension d)
        Resizes this component so that it has width d.width and height d.height.
        public void setSize(Dimension d)
        Resizes this component so that it has width d.width and height d.height.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        The d.width and d.height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize.

        The method changes the geometry-related data. Therefore, the native windowing system may ignore such requests, or it may modify the requested data, so that the Window object is placed and sized in a way that corresponds closely to the desktop settings.

        Overrides:
        setSize in class Component
        Parameters:
        d - the dimension specifying the new size of this component
        Since:
        1.6
        See Also:
        Component.getSize(), setBounds(int, int, int, int), setMinimumSize(java.awt.Dimension)
        Overridden member indicator setSize Reveal DetailHide Detail
        void setSize(int width, int height)
        Resizes this component so that it has width width and height height.
        public void setSize(int width, int height)
        Resizes this component so that it has width width and height height.

        This method changes layout-related information, and therefore, invalidates the component hierarchy.

        The width and height values are automatically enlarged if either is less than the minimum size as specified by previous call to setMinimumSize.

        The method changes the geometry-related data. Therefore, the native windowing system may ignore such requests, or it may modify the requested data, so that the Window object is placed and sized in a way that corresponds closely to the desktop settings.

        Overrides:
        setSize in class Component
        Parameters:
        width - the new width of this component in pixels
        height - the new height of this component in pixels
        Since:
        1.6
        See Also:
        Component.getSize(), setBounds(int, int, int, int), setMinimumSize(java.awt.Dimension)
        Inherited member indicator size Reveal DetailHide Detail
        Dimension size()
        Deprecated. As of JDK version 1.1, replaced by getSize().
        @Deprecated public Dimension size()
        Deprecated. As of JDK version 1.1, replaced by getSize().
        Inherited member indicator validate Reveal DetailHide Detail
        void validate()
        Validates this container and all of its subcomponents.
        public void validate()
        Description copied from class: Container
        Validates this container and all of its subcomponents.

        Validating a container means laying out its subcomponents. Layout-related changes, such as setting the bounds of a component, or adding a component to the container, invalidate the container automatically. Note that the ancestors of the container may be invalidated also (see Component.invalidate() for details.) Therefore, to restore the validity of the hierarchy, the validate() method should be invoked on the top-most invalid container of the hierarchy.

        Validating the container may be a quite time-consuming operation. For performance reasons a developer may postpone the validation of the hierarchy till a set of layout-related operations completes, e.g. after adding all the children to the container.

        If this Container is not valid, this method invokes the validateTree method and marks this Container as valid. Otherwise, no action is performed.

        Overrides:
        validate in class Component
        See Also:
        Container.add(java.awt.Component), Container.invalidate(), Container.isValidateRoot(), JComponent.revalidate(), Container.validateTree()
        Inherited member indicator validateTree Reveal DetailHide Detail
        protected void validateTree()
        Recursively descends the container tree and recomputes the layout for any subtrees marked as needing it (those marked as invalid).
        protected void validateTree()
        Description copied from class: Container
        Recursively descends the container tree and recomputes the layout for any subtrees marked as needing it (those marked as invalid). Synchronization should be provided by the method that calls this one: validate.
        See Also:
        Container.doLayout(), Container.validate()
      • Painting Methods 
        Modifier and Type Method and Description
        Inherited member indicator getIgnoreRepaint Reveal DetailHide Detail
        boolean getIgnoreRepaint()
         
        public boolean getIgnoreRepaint()
        Overridden member indicator paint Reveal DetailHide Detail
        void paint(Graphics g)
        Paints the container.
        public void paint(Graphics g)
        Paints the container. This forwards the paint to any lightweight components that are children of this container. If this method is reimplemented, super.paint(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, paint() will not be forwarded to that child.
        Overrides:
        paint in class Container
        Parameters:
        g - the specified Graphics window
        Since:
        1.7
        See Also:
        Component.update(Graphics)
        Inherited member indicator paintAll Reveal DetailHide Detail
        void paintAll(Graphics g)
        Paints this component and all of its subcomponents.
        public void paintAll(Graphics g)
        Description copied from class: Component
        Paints this component and all of its subcomponents.

        The origin of the graphics context, its (0, 0) coordinate point, is the top-left corner of this component. The clipping region of the graphics context is the bounding rectangle of this component.

        Parameters:
        g - the graphics context to use for painting
        Since:
        JDK1.0
        See Also:
        Component.paint(java.awt.Graphics)
        Inherited member indicator paintComponents Reveal DetailHide Detail
        void paintComponents(Graphics g)
        Paints each of the components in this container.
        public void paintComponents(Graphics g)
        Description copied from class: Container
        Paints each of the components in this container.
        Parameters:
        g - the graphics context.
        See Also:
        Component.paint(java.awt.Graphics), Component.paintAll(java.awt.Graphics)
        Inherited member indicator repaint Reveal DetailHide Detail
        void repaint()
        Repaints this component.
        public void repaint()
        Description copied from class: Component
        Repaints this component.

        If this component is a lightweight component, this method causes a call to this component's paint method as soon as possible. Otherwise, this method causes a call to this component's update method as soon as possible.

        Note: For more information on the paint mechanisms utilitized by AWT and Swing, including information on how to write the most efficient painting code, see Painting in AWT and Swing.

        Since:
        JDK1.0
        See Also:
        Component.update(Graphics)
        Inherited member indicator repaint Reveal DetailHide Detail
        void repaint(int x, int y, int width, int height)
        Repaints the specified rectangle of this component.
        public void repaint(int x, int y, int width, int height)
        Description copied from class: Component
        Repaints the specified rectangle of this component.

        If this component is a lightweight component, this method causes a call to this component's paint method as soon as possible. Otherwise, this method causes a call to this component's update method as soon as possible.

        Note: For more information on the paint mechanisms utilitized by AWT and Swing, including information on how to write the most efficient painting code, see Painting in AWT and Swing.

        Parameters:
        x - the x coordinate
        y - the y coordinate
        width - the width
        height - the height
        Since:
        JDK1.0
        See Also:
        Component.update(Graphics)
        Inherited member indicator repaint Reveal DetailHide Detail
        void repaint(long tm)
        Repaints the component.
        public void repaint(long tm)
        Description copied from class: Component
        Repaints the component. If this component is a lightweight component, this results in a call to paint within tm milliseconds.

        Note: For more information on the paint mechanisms utilitized by AWT and Swing, including information on how to write the most efficient painting code, see Painting in AWT and Swing.

        Parameters:
        tm - maximum time in milliseconds before update
        Since:
        JDK1.0
        See Also:
        Component.paint(java.awt.Graphics), Component.update(Graphics)
        Inherited member indicator repaint Reveal DetailHide Detail
        void repaint(long tm, int x, int y, int width, int height)
        Repaints the specified rectangle of this component within tm milliseconds.
        public void repaint(long tm, int x, int y, int width, int height)
        Description copied from class: Component
        Repaints the specified rectangle of this component within tm milliseconds.

        If this component is a lightweight component, this method causes a call to this component's paint method. Otherwise, this method causes a call to this component's update method.

        Note: For more information on the paint mechanisms utilitized by AWT and Swing, including information on how to write the most efficient painting code, see Painting in AWT and Swing.

        Parameters:
        tm - maximum time in milliseconds before update
        x - the x coordinate
        y - the y coordinate
        width - the width
        height - the height
        Since:
        JDK1.0
        See Also:
        Component.update(Graphics)
        Inherited member indicator setIgnoreRepaint Reveal DetailHide Detail
        void setIgnoreRepaint(boolean ignoreRepaint)
        Sets whether or not paint messages received from the operating system should be ignored.
        public void setIgnoreRepaint(boolean ignoreRepaint)
        Description copied from class: Component
        Sets whether or not paint messages received from the operating system should be ignored. This does not affect paint events generated in software by the AWT, unless they are an immediate response to an OS-level paint message.

        This is useful, for example, if running under full-screen mode and better performance is desired, or if page-flipping is used as the buffer strategy.

        Since:
        1.4
        See Also:
        Component.getIgnoreRepaint(), Canvas.createBufferStrategy(int), createBufferStrategy(int), BufferStrategy, GraphicsDevice.setFullScreenWindow(java.awt.Window)
        Inherited member indicator update Reveal DetailHide Detail
        void update(Graphics g)
        Updates the container.
        public void update(Graphics g)
        Description copied from class: Container
        Updates the container. This forwards the update to any lightweight components that are children of this container. If this method is reimplemented, super.update(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, update() will not be forwarded to that child.
        Overrides:
        update in class Component
        Parameters:
        g - the specified Graphics window
        See Also:
        Component.update(Graphics)
      • Printing Methods 
        Modifier and Type Method and Description
        Inherited member indicator list Reveal DetailHide Detail
        void list()
        Prints a listing of this component to the standard system output stream System.out.
        public void list()
        Description copied from class: Component
        Prints a listing of this component to the standard system output stream System.out.
        Since:
        JDK1.0
        See Also:
        System.out
        Inherited member indicator list Reveal DetailHide Detail
        void list(java.io.PrintStream out)
        Prints a listing of this component to the specified output stream.
        public void list(java.io.PrintStream out)
        Description copied from class: Component
        Prints a listing of this component to the specified output stream.
        Parameters:
        out - a print stream
        Throws:
        java.lang.NullPointerException - if out is null
        Since:
        JDK1.0
        Inherited member indicator list Reveal DetailHide Detail
        void list(java.io.PrintStream out, int indent)
        Prints a listing of this container to the specified output stream.
        public void list(java.io.PrintStream out, int indent)
        Description copied from class: Container
        Prints a listing of this container to the specified output stream. The listing starts at the specified indentation.

        The immediate children of the container are printed with an indentation of indent+1. The children of those children are printed at indent+2 and so on.

        Overrides:
        list in class Component
        Parameters:
        out - a print stream
        indent - the number of spaces to indent
        Throws:
        java.lang.NullPointerException - if out is null
        Since:
        JDK1.0
        See Also:
        Component.list(java.io.PrintStream, int)
        Inherited member indicator list Reveal DetailHide Detail
        void list(java.io.PrintWriter out)
        Prints a listing to the specified print writer.
        public void list(java.io.PrintWriter out)
        Description copied from class: Component
        Prints a listing to the specified print writer.
        Parameters:
        out - the print writer to print to
        Throws:
        java.lang.NullPointerException - if out is null
        Since:
        JDK1.1
        Inherited member indicator list Reveal DetailHide Detail
        void list(java.io.PrintWriter out, int indent)
        Prints out a list, starting at the specified indentation, to the specified print writer.
        public void list(java.io.PrintWriter out, int indent)
        Description copied from class: Container
        Prints out a list, starting at the specified indentation, to the specified print writer.

        The immediate children of the container are printed with an indentation of indent+1. The children of those children are printed at indent+2 and so on.

        Overrides:
        list in class Component
        Parameters:
        out - a print writer
        indent - the number of spaces to indent
        Throws:
        java.lang.NullPointerException - if out is null
        Since:
        JDK1.1
        See Also:
        Component.list(java.io.PrintWriter, int)
        Inherited member indicator print Reveal DetailHide Detail
        void print(Graphics g)
        Prints the container.
        public void print(Graphics g)
        Description copied from class: Container
        Prints the container. This forwards the print to any lightweight components that are children of this container. If this method is reimplemented, super.print(g) should be called so that lightweight components are properly rendered. If a child component is entirely clipped by the current clipping setting in g, print() will not be forwarded to that child.
        Overrides:
        print in class Component
        Parameters:
        g - the specified Graphics window
        See Also:
        Component.update(Graphics)
        Inherited member indicator printAll Reveal DetailHide Detail
        void printAll(Graphics g)
        Prints this component and all of its subcomponents.
        public void printAll(Graphics g)
        Description copied from class: Component
        Prints this component and all of its subcomponents.

        The origin of the graphics context, its (0, 0) coordinate point, is the top-left corner of this component. The clipping region of the graphics context is the bounding rectangle of this component.

        Parameters:
        g - the graphics context to use for printing
        Since:
        JDK1.0
        See Also:
        Component.print(Graphics)
        Inherited member indicator printComponents Reveal DetailHide Detail
        void printComponents(Graphics g)
        Prints each of the components in this container.
        public void printComponents(Graphics g)
        Description copied from class: Container
        Prints each of the components in this container.
        Parameters:
        g - the graphics context.
        See Also:
        Component.print(java.awt.Graphics), Component.printAll(java.awt.Graphics)
      • Other Methods 
        Modifier and Type Method and Description
        Inherited member indicator add Reveal DetailHide Detail
        void add(PopupMenu popup)
        Adds the specified popup menu to the component.
        public void add(PopupMenu popup)
        Description copied from class: Component
        Adds the specified popup menu to the component.
        Parameters:
        popup - the popup menu to be added to the component.
        Throws:
        java.lang.NullPointerException - if popup is null
        Since:
        JDK1.1
        See Also:
        Component.remove(MenuComponent)
        Overridden member indicator addNotify Reveal DetailHide Detail
        void addNotify()
        Makes this Window displayable by creating the connection to its native screen resource.
        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 in class Container
        Since:
        JDK1.0
        See Also:
        Component.isDisplayable(), Container.removeNotify()
        Ordinary member indicator addWindowFocusListener Reveal DetailHide Detail
        void addWindowFocusListener(WindowFocusListener l)
        Adds the specified window focus listener to receive window events from this window.
        public void addWindowFocusListener(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.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the window focus listener
        Since:
        1.4
        See Also:
        removeWindowFocusListener(java.awt.event.WindowFocusListener), getWindowFocusListeners()
        Ordinary member indicator addWindowListener Reveal DetailHide Detail
        void addWindowListener(WindowListener l)
        Adds the specified window listener to receive window events from this window.
        public void addWindowListener(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.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the window listener
        See Also:
        removeWindowListener(java.awt.event.WindowListener), getWindowListeners()
        Ordinary member indicator addWindowStateListener Reveal DetailHide Detail
        void addWindowStateListener(WindowStateListener l)
        Adds the specified window state listener to receive window events from this window.
        public void addWindowStateListener(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.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the window state listener
        Since:
        1.4
        See Also:
        removeWindowStateListener(java.awt.event.WindowStateListener), getWindowStateListeners()
        Ordinary member indicator applyResourceBundle Reveal DetailHide Detail
        void applyResourceBundle(java.util.ResourceBundle rb)
        Deprecated. As of J2SE 1.4, replaced by Component.applyComponentOrientation.
        @Deprecated public void applyResourceBundle(java.util.ResourceBundle rb)
        Deprecated. As of J2SE 1.4, replaced by Component.applyComponentOrientation.
        Ordinary member indicator applyResourceBundle Reveal DetailHide Detail
        void applyResourceBundle(java.lang.String rbName)
        Deprecated. As of J2SE 1.4, replaced by Component.applyComponentOrientation.
        @Deprecated public void applyResourceBundle(java.lang.String rbName)
        Deprecated. As of J2SE 1.4, replaced by Component.applyComponentOrientation.
        Overridden member indicator createBufferStrategy Reveal DetailHide Detail
        void createBufferStrategy(int numBuffers)
        Creates a new strategy for multi-buffering on this component.
        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:
        java.lang.IllegalArgumentException - if numBuffers is less than 1.
        java.lang.IllegalStateException - if the component is not displayable
        Since:
        1.4
        See Also:
        Component.isDisplayable(), getBufferStrategy()
        Overridden member indicator createBufferStrategy Reveal DetailHide Detail
        void createBufferStrategy(int numBuffers, BufferCapabilities caps)
        Creates a new strategy for multi-buffering on this component with the required buffer capabilities.
        public void createBufferStrategy(int numBuffers, BufferCapabilities caps) throws 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 - 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.
        java.lang.IllegalArgumentException - if numBuffers is less than 1, or if caps is null
        Since:
        1.4
        See Also:
        getBufferStrategy()
        Ordinary member indicator dispose Reveal DetailHide Detail
        void dispose()
        Releases all of the native screen resources used by this Window, its subcomponents, and all of its owned children.
        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(), pack(), show()
        Overridden member indicator getBufferStrategy Reveal DetailHide Detail
        java.awt.image.BufferStrategy getBufferStrategy()
        Returns the BufferStrategy used by this component.
        public java.awt.image.BufferStrategy getBufferStrategy()
        Returns the BufferStrategy used by this component. This method will return null if a BufferStrategy has not yet been created or has been disposed.
        Returns:
        the buffer strategy used by this component
        Since:
        1.4
        See Also:
        createBufferStrategy(int)
        Inherited member indicator getDropTarget Reveal DetailHide Detail
        java.awt.dnd.DropTarget getDropTarget()
        Gets the DropTarget associated with this Component.
        public java.awt.dnd.DropTarget getDropTarget()
        Description copied from class: Component
        Gets the DropTarget associated with this Component.
        Ordinary member indicator getFocusableWindowState Reveal DetailHide Detail
        boolean getFocusableWindowState()
        Returns whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow.
        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(), setFocusableWindowState(boolean), isShowing(), Component.setFocusable(boolean)
        Ordinary member indicator getFocusOwner Reveal DetailHide Detail
        Component getFocusOwner()
        Returns the child Component of this Window that has focus if this Window is focused; returns null otherwise.
        public 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(), isFocused()
        Ordinary member indicator getIconImages Reveal DetailHide Detail
        java.util.List<Image> getIconImages()
        Returns the sequence of images to be displayed as the icon for this window.
        public java.util.List<Image> getIconImages()
        Returns the sequence of images to be displayed as the icon for this window.

        This method returns a copy of the internally stored list, so all operations on the returned object will not affect the window's behavior.

        Returns:
        the copy of icon images' list for this window, or empty list if this window doesn't have icon images.
        Since:
        1.6
        See Also:
        setIconImages(java.util.List<? extends java.awt.Image>), setIconImage(Image)
        Overridden member indicator getInputContext Reveal DetailHide Detail
        java.awt.im.InputContext getInputContext()
        Gets the input context for this window.
        public 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 in class Component
        Returns:
        the input context used by this component; null if no context can be determined
        Since:
        1.2
        See Also:
        Component.getInputContext()
        Inherited member indicator getInputMethodRequests Reveal DetailHide Detail
        java.awt.im.InputMethodRequests getInputMethodRequests()
        Gets the input method request handler which supports requests from input methods for this component.
        public java.awt.im.InputMethodRequests getInputMethodRequests()
        Description copied from class: Component
        Gets the input method request handler which supports requests from input methods for this component. A component that supports on-the-spot text input must override this method to return an InputMethodRequests instance. At the same time, it also has to handle input method events.
        Returns:
        the input method request handler for this component, null by default
        Since:
        1.2
        See Also:
        Component.addInputMethodListener(java.awt.event.InputMethodListener)
        Ordinary member indicator getModalExclusionType Reveal DetailHide Detail
        Dialog.ModalExclusionType getModalExclusionType()
        Returns the modal exclusion type of this window.
        public Dialog.ModalExclusionType getModalExclusionType()
        Returns the modal exclusion type of this window.
        Returns:
        the modal exclusion type of this window
        Since:
        1.6
        See Also:
        Dialog.ModalExclusionType, setModalExclusionType(java.awt.Dialog.ModalExclusionType)
        Ordinary member indicator getMostRecentFocusOwner Reveal DetailHide Detail
        Component getMostRecentFocusOwner()
        Returns the child Component of this Window that will receive the focus when this Window is focused.
        public 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(), isFocused(), isFocusableWindow()
        Ordinary member indicator getOpacity Reveal DetailHide Detail
        float getOpacity()
        Returns the opacity of the window.
        public float getOpacity()
        Returns the opacity of the window.
        Returns:
        the opacity of the window
        Since:
        1.7
        See Also:
        setOpacity(float), GraphicsDevice.WindowTranslucency
        Ordinary member indicator getOwnedWindows Reveal DetailHide Detail
        Window[] getOwnedWindows()
        Return an array containing all the windows this window currently owns.
        public Window[] getOwnedWindows()
        Return an array containing all the windows this window currently owns.
        Since:
        1.2
        Ordinary member indicator getOwner Reveal DetailHide Detail
        Window getOwner()
        Returns the owner of this window.
        public Window getOwner()
        Returns the owner of this window.
        Since:
        1.2
        Inherited member indicator getPeer Reveal DetailHide Detail
        java.awt.peer.ComponentPeer getPeer()
        Deprecated. As of JDK version 1.1, programs should not directly manipulate peers; replaced by boolean isDisplayable().
        @Deprecated public java.awt.peer.ComponentPeer getPeer()
        Deprecated. As of JDK version 1.1, programs should not directly manipulate peers; replaced by boolean isDisplayable().
        Ordinary member indicator getShape Reveal DetailHide Detail
        Shape getShape()
        Returns the shape of the window.
        public Shape getShape()
        Returns the shape of the window. The value returned by this method may not be the same as previously set with setShape(shape), but it is guaranteed to represent the same shape.
        Returns:
        the shape of the window or null if no shape is specified for the window
        Since:
        1.7
        See Also:
        setShape(Shape), GraphicsDevice.WindowTranslucency
        Inherited member indicator getTreeLock Reveal DetailHide Detail
        java.lang.Object getTreeLock()
        Gets this component's locking object (the object that owns the thread synchronization monitor) for AWT component-tree and layout operations.
        public final java.lang.Object getTreeLock()
        Description copied from class: Component
        Gets this component's locking object (the object that owns the thread synchronization monitor) for AWT component-tree and layout operations.
        Returns:
        this component's locking object
        Ordinary member indicator getType Reveal DetailHide Detail
        Window.Type getType()
        Returns the type of the window.
        public Window.Type getType()
        Returns the type of the window.
        Since:
        1.7
        See Also:
        setType(java.awt.Window.Type)
        Ordinary member indicator getWarningString Reveal DetailHide Detail
        java.lang.String getWarningString()
        Gets the warning string that is displayed with this window.
        public final 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)
        Ordinary member indicator getWindowFocusListeners Reveal DetailHide Detail
        WindowFocusListener[] getWindowFocusListeners()
        Returns an array of all the window focus listeners registered on this window.
        public 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), removeWindowFocusListener(java.awt.event.WindowFocusListener)
        Ordinary member indicator getWindowListeners Reveal DetailHide Detail
        WindowListener[] getWindowListeners()
        Returns an array of all the window listeners registered on this window.
        public 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), removeWindowListener(java.awt.event.WindowListener)
        Ordinary member indicator getWindowStateListeners Reveal DetailHide Detail
        WindowStateListener[] getWindowStateListeners()
        Returns an array of all the window state listeners registered on this window.
        public 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), removeWindowStateListener(java.awt.event.WindowStateListener)
        Ordinary member indicator isActive Reveal DetailHide Detail
        boolean isActive()
        Returns whether this Window is active.
        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()
        Ordinary member indicator isAlwaysOnTop Reveal DetailHide Detail
        boolean isAlwaysOnTop()
        Returns whether this window is an always-on-top window.
        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)
        Ordinary member indicator isAlwaysOnTopSupported Reveal DetailHide Detail
        boolean isAlwaysOnTopSupported()
        Returns whether the always-on-top mode is supported for this window.
        public boolean isAlwaysOnTopSupported()
        Returns whether the always-on-top mode is supported for this window. Some platforms may not support always-on-top windows, some may support only some kinds of top-level windows; for example, a platform may not support always-on-top modal dialogs.
        Returns:
        true, if the always-on-top mode is supported by the toolkit and for this window, false, if always-on-top mode is not supported for this window or toolkit doesn't support always-on-top windows.
        Since:
        1.6
        See Also:
        setAlwaysOnTop(boolean), Toolkit.isAlwaysOnTopSupported()
        Ordinary member indicator isAutoRequestFocus Reveal DetailHide Detail
        boolean isAutoRequestFocus()
        Returns whether this window should receive focus on subsequently being shown (with a call to setVisible(true)), or being moved to the front (with a call to toFront()).
        public boolean isAutoRequestFocus()
        Returns whether this window should receive focus on subsequently being shown (with a call to setVisible(true)), or being moved to the front (with a call to toFront()).

        By default, the window has autoRequestFocus value of true.

        Returns:
        autoRequestFocus value
        Since:
        1.7
        See Also:
        setAutoRequestFocus(boolean)
        Ordinary member indicator isFocusableWindow Reveal DetailHide Detail
        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.
        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(), setFocusableWindowState(boolean), isShowing(), Component.isFocusable()
        Ordinary member indicator isFocused Reveal DetailHide Detail
        boolean isFocused()
        Returns whether this Window is focused.
        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()
        Ordinary member indicator isLocationByPlatform Reveal DetailHide Detail
        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.
        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), isShowing()
        Ordinary member indicator pack Reveal DetailHide Detail
        void pack()
        Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
        public void pack()
        Causes this Window to be sized to fit the preferred size and layouts of its subcomponents. The resulting width and height of the window are automatically enlarged if either of dimensions is less than the minimum size as specified by the previous call to the setMinimumSize method.

        If the window and/or its owner are not displayable yet, both of them are made displayable before calculating the preferred size. The Window is validated after its size is being calculated.

        See Also:
        Component.isDisplayable(), setMinimumSize(java.awt.Dimension)
        Inherited member indicator paramString Reveal DetailHide Detail
        protected java.lang.String paramString()
        Returns a string representing the state of this Container.
        protected java.lang.String paramString()
        Description copied from class: Container
        Returns a string representing the state of this Container. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
        Overrides:
        paramString in class Component
        Returns:
        the parameter string of this container
        Ordinary member indicator processWindowEvent Reveal DetailHide Detail
        protected void processWindowEvent(WindowEvent e)
        Processes window events occurring on this window by dispatching them to any registered WindowListener objects.
        protected void processWindowEvent(WindowEvent e)
        Processes window events occurring on this window by dispatching them to any registered WindowListener objects. NOTE: This method will not be called unless window events are enabled for this component; this happens when one of the following occurs:
        • A WindowListener object is registered via addWindowListener
        • Window events are enabled via enableEvents

        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)
        Ordinary member indicator processWindowFocusEvent Reveal DetailHide Detail
        protected void processWindowFocusEvent(WindowEvent e)
        Processes window focus event occuring on this window by dispatching them to any registered WindowFocusListener objects.
        protected void processWindowFocusEvent(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:
        • a WindowFocusListener is registered via addWindowFocusListener
        • Window focus events are enabled via enableEvents

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

        Parameters:
        e - the window focus event
        Since:
        1.4
        See Also:
        Component.enableEvents(long)
        Ordinary member indicator processWindowStateEvent Reveal DetailHide Detail
        protected void processWindowStateEvent(WindowEvent e)
        Processes window state event occuring on this window by dispatching them to any registered WindowStateListener objects.
        protected void processWindowStateEvent(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:
        • a WindowStateListener is registered via addWindowStateListener
        • window state events are enabled via enableEvents

        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)
        Inherited member indicator remove Reveal DetailHide Detail
        void remove(MenuComponent popup)
        Removes the specified popup menu from the component.
        public void remove(MenuComponent popup)
        Description copied from class: Component
        Removes the specified popup menu from the component.
        Specified by:
        remove in interface MenuContainer
        Parameters:
        popup - the popup menu to be removed
        Since:
        JDK1.1
        See Also:
        Component.add(PopupMenu)
        Overridden member indicator removeNotify Reveal DetailHide Detail
        void removeNotify()
        Makes this Container undisplayable by removing its connection to its native screen resource.
        public void removeNotify()
        Makes this Container undisplayable by removing its connection to its native screen resource. Making a container undisplayable will cause all of its children to be made undisplayable. This method is called by the toolkit internally and should not be called directly by programs.
        Overrides:
        removeNotify in class Container
        See Also:
        Component.isDisplayable(), Container.addNotify()
        Ordinary member indicator removeWindowFocusListener Reveal DetailHide Detail
        void removeWindowFocusListener(WindowFocusListener l)
        Removes the specified window focus listener so that it no longer receives window events from this window.
        public void removeWindowFocusListener(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.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the window focus listener
        Since:
        1.4
        See Also:
        addWindowFocusListener(java.awt.event.WindowFocusListener), getWindowFocusListeners()
        Ordinary member indicator removeWindowListener Reveal DetailHide Detail
        void removeWindowListener(WindowListener l)
        Removes the specified window listener so that it no longer receives window events from this window.
        public void removeWindowListener(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.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the window listener
        See Also:
        addWindowListener(java.awt.event.WindowListener), getWindowListeners()
        Ordinary member indicator removeWindowStateListener Reveal DetailHide Detail
        void removeWindowStateListener(WindowStateListener l)
        Removes the specified window state listener so that it no longer receives window events from this window.
        public void removeWindowStateListener(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.

        Refer to AWT Threading Issues for details on AWT's threading model.

        Parameters:
        l - the window state listener
        Since:
        1.4
        See Also:
        addWindowStateListener(java.awt.event.WindowStateListener), getWindowStateListeners()
        Ordinary member indicator setAlwaysOnTop Reveal DetailHide Detail
        void setAlwaysOnTop(boolean alwaysOnTop)
        Sets whether this window should always be above other windows.
        public final void setAlwaysOnTop(boolean alwaysOnTop) throws java.lang.SecurityException
        Sets whether this window should always be above other windows. If there are multiple always-on-top windows, their relative order is unspecified and platform dependent.

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

        All windows owned by an always-on-top window inherit this state and automatically become always-on-top. If a window ceases to be always-on-top, the windows that it owns will no longer be always-on-top. When an always-on-top window is sent toBack, its always-on-top state is set to false.

        When this method is called on a window with a value of true, and the window is visible and the platform supports always-on-top for this window, the window is immediately brought forward, "sticking" it in the top-most position. If the window isn`t currently visible, this method sets the always-on-top state to true but does not bring the window forward. When the window is later shown, it will be always-on-top.

        When this method is called on a window with a value of false the always-on-top state is set to normal. The window remains in the top-most position but it`s z-order can be changed as for any other window. Calling this method with a value of false on a window that has a normal state has no effect. Setting the always-on-top state to false has no effect on the relative z-order of the windows if there are no other always-on-top windows.

        Note: some platforms might not support always-on-top windows. To detect if always-on-top windows are supported by the current platform, use Toolkit.isAlwaysOnTopSupported() and isAlwaysOnTopSupported(). If always-on-top mode isn't supported by the toolkit or for this window, calling this method has no effect.

        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 - true if the window should always be above other windows
        Throws:
        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(), toFront(), toBack(), AWTPermission, isAlwaysOnTopSupported(), Toolkit.isAlwaysOnTopSupported()
        Ordinary member indicator setAutoRequestFocus Reveal DetailHide Detail
        void setAutoRequestFocus(boolean autoRequestFocus)
        Sets whether this window should receive focus on subsequently being shown (with a call to setVisible(true)), or being moved to the front (with a call to toFront()).
        public void setAutoRequestFocus(boolean autoRequestFocus)
        Sets whether this window should receive focus on subsequently being shown (with a call to setVisible(true)), or being moved to the front (with a call to toFront()).

        Note that setVisible(true) may be called indirectly (e.g. when showing an owner of the window makes the window to be shown). toFront() may also be called indirectly (e.g. when setVisible(true) is called on already visible window). In all such cases this property takes effect as well.

        The value of the property is not inherited by owned windows.

        Parameters:
        autoRequestFocus - whether this window should be focused on subsequently being shown or being moved to the front
        Since:
        1.7
        See Also:
        isAutoRequestFocus(), isFocusableWindow(), setVisible(boolean), toFront()
        Inherited member indicator setDropTarget Reveal DetailHide Detail
        void setDropTarget(java.awt.dnd.DropTarget dt)
        Associate a DropTarget with this component.
        public void setDropTarget(java.awt.dnd.DropTarget dt)
        Description copied from class: Component
        Associate a DropTarget with this component. The Component will receive drops only if it is enabled.
        Parameters:
        dt - The DropTarget
        See Also:
        Component.isEnabled()
        Ordinary member indicator setFocusableWindowState Reveal DetailHide Detail
        void setFocusableWindowState(boolean focusableWindowState)
        Sets whether this Window can become the focused Window if it meets the other requirements outlined in isFocusableWindow.
        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(), getFocusableWindowState(), isShowing(), Component.setFocusable(boolean)
        Ordinary member indicator setIconImage Reveal DetailHide Detail
        void setIconImage(Image image)
        Sets the image to be displayed as the icon for this window.
        public void setIconImage(Image image)
        Sets the image to be displayed as the icon for this window.

        This method can be used instead of setIconImages() to specify a single image as a window's icon.

        The following statement:

             setIconImage(image);
         
        is equivalent to:
             ArrayList<Image> imageList = new ArrayList<Image>();
             imageList.add(image);
             setIconImages(imageList);
         

        Note : Native windowing systems may use different images of differing dimensions to represent a window, depending on the context (e.g. window decoration, window list, taskbar, etc.). They could also use just a single image for all contexts or no image at all.

        Parameters:
        image - the icon image to be displayed.
        Since:
        1.6
        See Also:
        setIconImages(java.util.List<? extends java.awt.Image>), getIconImages()
        Ordinary member indicator setIconImages Reveal DetailHide Detail
        void setIconImages(java.util.List<? extends Image> icons)
        Sets the sequence of images to be displayed as the icon for this window.
        public void setIconImages(java.util.List<? extends Image> icons)
        Sets the sequence of images to be displayed as the icon for this window. Subsequent calls to getIconImages will always return a copy of the icons list.

        Depending on the platform capabilities one or several images of different dimensions will be used as the window's icon.

        The icons list is scanned for the images of most appropriate dimensions from the beginning. If the list contains several images of the same size, the first will be used.

        Ownerless windows with no icon specified use platfrom-default icon. The icon of an owned window may be inherited from the owner unless explicitly overridden. Setting the icon to null or empty list restores the default behavior.

        Note : Native windowing systems may use different images of differing dimensions to represent a window, depending on the context (e.g. window decoration, window list, taskbar, etc.). They could also use just a single image for all contexts or no image at all.

        Parameters:
        icons - the list of icon images to be displayed.
        Since:
        1.6
        See Also:
        getIconImages(), setIconImage(Image)
        Ordinary member indicator setLocationByPlatform Reveal DetailHide Detail
        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.
        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:
        setLocation(int, int), isShowing(), setVisible(boolean), isLocationByPlatform(), System.getProperty(String)
        Ordinary member indicator setLocationRelativeTo Reveal DetailHide Detail
        void setLocationRelativeTo(Component c)
        Sets the location of the window relative to the specified component according to the following scenarios.
        public void setLocationRelativeTo(Component c)
        Sets the location of the window relative to the specified component according to the following scenarios.

        The target screen mentioned below is a screen to which the window should be placed after the setLocationRelativeTo method is called.

        • If the component is null, or the GraphicsConfiguration associated with this component is null, the window is placed in the center of the screen. The center point can be obtained with the GraphicsEnvironment.getCenterPoint method.
        • If the component is not null, but it is not currently showing, the window is placed in the center of the target screen defined by the GraphicsConfiguration associated with this component.
        • If the component is not null and is shown on the screen, then the window is located in such a way that the center of the window coincides with the center of the component.

        If the screens configuration does not allow the window to be moved from one screen to another, then the window is only placed at the location determined according to the above conditions and its GraphicsConfiguration is not changed.

        Note: If the lower edge of the window is out of the screen, then 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 vice versa.

        If after the window location has been calculated, the upper, left, or right edge of the window is out of the screen, then the window is located in such a way that the upper, left, or right edge of the window coincides with the corresponding edge of the screen. If both left and right edges of the window are out of the screen, the window is placed at the left side of the screen. The similar placement will occur if both top and bottom edges are out of the screen. In that case, the window is placed at the top side of the screen.

        The method changes the geometry-related data. Therefore, the native windowing system may ignore such requests, or it may modify the requested data, so that the Window object is placed and sized in a way that corresponds closely to the desktop settings.

        Parameters:
        c - the component in relation to which the window's location is determined
        Since:
        1.4
        See Also:
        GraphicsEnvironment.getCenterPoint()
        Ordinary member indicator setModalExclusionType Reveal DetailHide Detail
        void setModalExclusionType(Dialog.ModalExclusionType exclusionType)
        Specifies the modal exclusion type for this window.
        public void setModalExclusionType(Dialog.ModalExclusionType exclusionType)
        Specifies the modal exclusion type for this window. If a window is modal excluded, it is not blocked by some modal dialogs. See Dialog.ModalExclusionType for possible modal exclusion types.

        If the given type is not supported, NO_EXCLUDE is used.

        Note: changing the modal exclusion type for a visible window may have no effect until it is hidden and then shown again.

        Parameters:
        exclusionType - the modal exclusion type for this window; a null value is equivivalent to NO_EXCLUDE
        Throws:
        java.lang.SecurityException - if the calling thread does not have permission to set the modal exclusion property to the window with the given exclusionType
        Since:
        1.6
        See Also:
        Dialog.ModalExclusionType, getModalExclusionType(), Toolkit.isModalExclusionTypeSupported(java.awt.Dialog.ModalExclusionType)
        Ordinary member indicator setOpacity Reveal DetailHide Detail
        void setOpacity(float opacity)
        Sets the opacity of the window.
        public void setOpacity(float opacity)
        Sets the opacity of the window.

        The opacity value is in the range [0..1]. Note that setting the opacity level of 0 may or may not disable the mouse event handling on this window. This is a platform-dependent behavior.

        The following conditions must be met in order to set the opacity value less than 1.0f:

        • The TRANSLUCENT translucency must be supported by the underlying system
        • The window must be undecorated (see Frame.setUndecorated(boolean) and Dialog.setUndecorated(boolean))
        • The window must not be in full-screen mode (see GraphicsDevice.setFullScreenWindow(Window))

        If the requested opacity value is less than 1.0f, and any of the above conditions are not met, the window opacity will not change, and the IllegalComponentStateException will be thrown.

        The translucency levels of individual pixels may also be effected by the alpha component of their color (see setBackground(Color)) and the current shape of this window (see setShape(Shape)).

        Parameters:
        opacity - the opacity level to set to the window
        Throws:
        java.lang.IllegalArgumentException - if the opacity is out of the range [0..1]
        IllegalComponentStateException - if the window is decorated and the opacity is less than 1.0f
        IllegalComponentStateException - if the window is in full screen mode, and the opacity is less than 1.0f
        java.lang.UnsupportedOperationException - if the GraphicsDevice.WindowTranslucency#TRANSLUCENT TRANSLUCENT translucency is not supported and the opacity is less than 1.0f
        Since:
        1.7
        See Also:
        getOpacity(), setBackground(Color), setShape(Shape), Frame.isUndecorated(), Dialog.isUndecorated(), GraphicsDevice.WindowTranslucency, GraphicsDevice.isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)
        Ordinary member indicator setShape Reveal DetailHide Detail
        void setShape(Shape shape)
        Sets the shape of the window.
        public void setShape(Shape shape)
        Sets the shape of the window.

        Setting a shape cuts off some parts of the window. Only the parts that belong to the given Shape remain visible and clickable. If the shape argument is null, this method restores the default shape, making the window rectangular on most platforms.

        The following conditions must be met to set a non-null shape:

        • The PERPIXEL_TRANSPARENT translucency must be supported by the underlying system
        • The window must be undecorated (see Frame.setUndecorated(boolean) and Dialog.setUndecorated(boolean))
        • The window must not be in full-screen mode (see GraphicsDevice.setFullScreenWindow(Window))

        If the requested shape is not null, and any of the above conditions are not met, the shape of this window will not change, and either the UnsupportedOperationException or IllegalComponentStateException will be thrown.

        The tranlucency levels of individual pixels may also be effected by the alpha component of their color (see setBackground(Color)) and the opacity value (see setOpacity(float)). See GraphicsDevice.WindowTranslucency for more details.

        Parameters:
        shape - the shape to set to the window
        Throws:
        IllegalComponentStateException - if the shape is not null and the window is decorated
        IllegalComponentStateException - if the shape is not null and the window is in full-screen mode
        java.lang.UnsupportedOperationException - if the shape is not null and PERPIXEL_TRANSPARENT translucency is not supported
        Since:
        1.7
        See Also:
        getShape(), setBackground(Color), setOpacity(float), Frame.isUndecorated(), Dialog.isUndecorated(), GraphicsDevice.WindowTranslucency, GraphicsDevice.isWindowTranslucencySupported(GraphicsDevice.WindowTranslucency)
        Ordinary member indicator setType Reveal DetailHide Detail
        void setType(Window.Type type)
        Sets the type of the window.
        public void setType(Window.Type type)
        Sets the type of the window. This method can only be called while the window is not displayable.
        Throws:
        IllegalComponentStateException - if the window is displayable.
        java.lang.IllegalArgumentException - if the type is null
        Since:
        1.7
        See Also:
        Component.isDisplayable(), getType()
        Ordinary member indicator toBack Reveal DetailHide Detail
        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.
        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()
        Ordinary member indicator toFront Reveal DetailHide Detail
        void toFront()
        If this Window is visible, brings this Window to the front and may make it the focused Window.
        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.

        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) under the following conditions:

        • The window meets the requirements outlined in the isFocusableWindow() method.
        • The window's property autoRequestFocus is of the true value.
        • Native windowing system allows the window to get 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.

        If this window is blocked by modal dialog, then the blocking dialog is brought to the front and remains above the blocked window.

        See Also:
        toBack(), setAutoRequestFocus(boolean), isFocusableWindow()
        Inherited member indicator toString Reveal DetailHide Detail
        java.lang.String toString()
        Returns a string representation of this component and its values.
        public java.lang.String toString()
        Description copied from class: Component
        Returns a string representation of this component and its values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation of this component
        Since:
        JDK1.0
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
This document was created by Dulcet from the OpenJDK sources. Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.

SourceForge