Save This Page
Home » openjdk-7 » java » awt » [javadoc | source]
java.awt
public class: Frame [javadoc | source]
java.lang.Object
   java.awt.Component
      java.awt.Container
         java.awt.Window
            java.awt.Frame

All Implemented Interfaces:
    MenuContainer, Accessible, Serializable, ImageObserver

A Frame is a top-level window with a title and a border.

The size of the frame includes any area designated for the border. The dimensions of the border area may be obtained using the getInsets method, however, since these dimensions are platform-dependent, a valid insets value cannot be obtained until the frame is made displayable by either calling pack or show. Since the border area is included in the overall size of the frame, the border effectively obscures a portion of the frame, constraining the area available for rendering and/or displaying subcomponents to the rectangle which has an upper-left corner location of (insets.left, insets.top), and has a size of width - (insets.left + insets.right) by height - (insets.top + insets.bottom).

The default layout for a frame is BorderLayout.

A frame may have its native decorations (i.e. Frame and Titlebar) turned off with setUndecorated. This can only be done while the frame is not displayable .

In a multi-screen environment, you can create a Frame on a different screen device by constructing the Frame with #Frame(GraphicsConfiguration) or #Frame(String title, 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-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 of virtual device encompassing three physical screens and one primary physical screen. The primary physical screen
shows (0,0) coords while a different physical screen shows (-80,-100) coords.

In such an environment, when calling setLocation, you must pass a virtual coordinate to this method. Similarly, calling getLocationOnScreen on a Frame 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 the Frame 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 Frame 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.

     Frame f = new Frame(GraphicsConfiguration gc);
     Rectangle bounds = gc.getBounds();
     f.setLocation(10 + bounds.x, 10 + bounds.y);

Frames are capable of generating the following types of WindowEvents:

Nested Class Summary:
protected class  Frame.AccessibleAWTFrame  This class implements accessibility support for the Frame class. It provides an implementation of the Java Accessibility API appropriate to frame user-interface elements. 
Field Summary
public static final  int DEFAULT_CURSOR   
     
    public static final  int CROSSHAIR_CURSOR   
       
      public static final  int TEXT_CURSOR   
         
        public static final  int WAIT_CURSOR   
           
          public static final  int SW_RESIZE_CURSOR   
             
            public static final  int SE_RESIZE_CURSOR   
               
              public static final  int NW_RESIZE_CURSOR   
                 
                public static final  int NE_RESIZE_CURSOR   
                   
                  public static final  int N_RESIZE_CURSOR   
                     
                    public static final  int S_RESIZE_CURSOR   
                       
                      public static final  int W_RESIZE_CURSOR   
                         
                        public static final  int E_RESIZE_CURSOR   
                           
                          public static final  int HAND_CURSOR   
                             
                            public static final  int MOVE_CURSOR   
                               
                              public static final  int NORMAL    Frame is in the "normal" state. This symbolic constant names a frame state with all state bits cleared. 
                              public static final  int ICONIFIED    This state bit indicates that frame is iconified. 
                              public static final  int MAXIMIZED_HORIZ    This state bit indicates that frame is maximized in the horizontal direction. 
                              public static final  int MAXIMIZED_VERT    This state bit indicates that frame is maximized in the vertical direction. 
                              public static final  int MAXIMIZED_BOTH    This state bit mask indicates that frame is fully maximized (that is both horizontally and vertically). It is just a convenience alias for MAXIMIZED_VERT | MAXIMIZED_HORIZ.

                              Note that the correct test for frame being fully maximized is

                                  (state & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH
                              

                              To test is frame is maximized in some direction use

                                  (state & Frame.MAXIMIZED_BOTH) != 0
                              
                               
                               Rectangle maximizedBounds    Maximized bounds for this frame. 
                               String title    This is the title of the frame. It can be changed at any time. title can be null and if this is the case the title = "". 
                               MenuBar menuBar    The frames menubar. If menuBar = null the frame will not have a menubar. 
                               boolean resizable    This field indicates whether the frame is resizable. This property can be changed at any time. resizable will be true if the frame is resizable, otherwise it will be false. 
                               boolean undecorated    This field indicates whether the frame is undecorated. This property can only be changed while the frame is not displayable. undecorated will be true if the frame is undecorated, otherwise it will be false. 
                               boolean mbManagement    mbManagement is only used by the Motif implementation.
                                serial:
                               
                               Vector ownedWindows     
                              Fields inherited from java.awt.Window:
                              warningString,  icons,  systemSyncLWRequests,  syncLWRequests,  beforeFirstShow,  OPENED,  state,  ownedWindowList,  showWithParent,  modalBlocker,  modalExclusionType,  windowListener,  windowStateListener,  windowFocusListener,  inputContext,  isInShow,  isTrayIconWindow,  anchor
                              Fields inherited from java.awt.Container:
                              layoutMgr,  containerListener,  listeningChildren,  listeningBoundsChildren,  descendantsCount,  preserveBackgroundColor,  INCLUDE_SELF,  SEARCH_HEAVYWEIGHTS,  modalComp,  modalAppContext
                              Fields inherited from java.awt.Component:
                              peer,  parent,  appContext,  x,  y,  width,  height,  foreground,  background,  font,  peerFont,  cursor,  locale,  bufferStrategy,  ignoreRepaint,  visible,  enabled,  dropTarget,  popups,  focusTraversalKeys,  LOCK,  minSize,  minSizeSet,  prefSize,  prefSizeSet,  maxSize,  maxSizeSet,  componentOrientation,  newEventsOnly,  componentListener,  focusListener,  hierarchyListener,  hierarchyBoundsListener,  keyListener,  mouseListener,  mouseMotionListener,  mouseWheelListener,  inputMethodListener,  windowClosingException,  actionListenerK,  adjustmentListenerK,  componentListenerK,  containerListenerK,  focusListenerK,  itemListenerK,  keyListenerK,  mouseListenerK,  mouseMotionListenerK,  mouseWheelListenerK,  textListenerK,  ownedWindowK,  windowListenerK,  inputMethodListenerK,  hierarchyListenerK,  hierarchyBoundsListenerK,  windowStateListenerK,  windowFocusListenerK,  eventMask,  isInc,  incRate,  TOP_ALIGNMENT,  CENTER_ALIGNMENT,  BOTTOM_ALIGNMENT,  LEFT_ALIGNMENT,  RIGHT_ALIGNMENT,  isPacked,  backgroundEraseDisabled,  eventCache,  accessibleContext
                              Constructor:
                               public Frame() throws HeadlessException 
                                Constructs a new instance of Frame that is initially invisible. The title of the Frame is empty.
                                Throws:
                                HeadlessException - when GraphicsEnvironment.isHeadless() returns true
                                Also see:
                                java.awt.GraphicsEnvironment#isHeadless()
                                Component#setSize
                                Component#setVisible(boolean)
                                exception: HeadlessException - when GraphicsEnvironment.isHeadless() returns true
                               public Frame(GraphicsConfiguration gc) 
                                Constructs a new, initially invisible {@code Frame} with the specified {@code GraphicsConfiguration}.
                                Parameters:
                                gc - the GraphicsConfiguration of the target screen device. If gc is null, the system default GraphicsConfiguration is assumed.
                                Throws:
                                IllegalArgumentException - if gc is not from a screen device.
                                HeadlessException - when GraphicsEnvironment.isHeadless() returns true
                                Also see:
                                java.awt.GraphicsEnvironment#isHeadless()
                                exception: IllegalArgumentException - if gc is not from a screen device.
                                exception: HeadlessException - when GraphicsEnvironment.isHeadless() returns true
                                since: 1.3 -
                               public Frame(String title) throws HeadlessException 
                                Constructs a new, initially invisible Frame object with the specified title.
                                Parameters:
                                title - the title to be displayed in the frame's border. A null value is treated as an empty string, "".
                                Throws:
                                HeadlessException - when GraphicsEnvironment.isHeadless() returns true
                                Also see:
                                java.awt.GraphicsEnvironment#isHeadless()
                                java.awt.Component#setSize
                                java.awt.Component#setVisible(boolean)
                                java.awt.GraphicsConfiguration#getBounds
                                exception: HeadlessException - when GraphicsEnvironment.isHeadless() returns true
                               public Frame(String title,
                                  GraphicsConfiguration gc) 
                                Constructs a new, initially invisible Frame object with the specified title and a GraphicsConfiguration.
                                Parameters:
                                title - the title to be displayed in the frame's border. A null value is treated as an empty string, "".
                                gc - the GraphicsConfiguration of the target screen device. If gc is null, the system default GraphicsConfiguration is assumed.
                                Throws:
                                IllegalArgumentException - if gc is not from a screen device.
                                HeadlessException - when GraphicsEnvironment.isHeadless() returns true
                                Also see:
                                java.awt.GraphicsEnvironment#isHeadless()
                                java.awt.Component#setSize
                                java.awt.Component#setVisible(boolean)
                                java.awt.GraphicsConfiguration#getBounds
                                exception: IllegalArgumentException - if gc is not from a screen device.
                                exception: HeadlessException - when GraphicsEnvironment.isHeadless() returns true
                                since: 1.3 -
                              Method from java.awt.Frame Summary:
                              addNotify,   constructComponentName,   getAccessibleContext,   getCursorType,   getExtendedState,   getFrames,   getIconImage,   getMaximizedBounds,   getMenuBar,   getState,   getTitle,   isResizable,   isUndecorated,   paramString,   postProcessKeyEvent,   remove,   removeNotify,   setBackground,   setCursor,   setExtendedState,   setIconImage,   setMaximizedBounds,   setMenuBar,   setOpacity,   setResizable,   setShape,   setState,   setTitle,   setUndecorated
                              Methods from java.awt.Window:
                              addNotify,   addOwnedWindow,   addPropertyChangeListener,   addPropertyChangeListener,   addWindowFocusListener,   addWindowListener,   addWindowStateListener,   adjustDecendantsOnParent,   adjustListeningChildrenOnParent,   applyCompoundShape,   applyCurrentShape,   applyResourceBundle,   applyResourceBundle,   canContainFocusOwner,   clearMostRecentFocusOwnerOnHide,   closeSplashScreen,   connectOwnedWindow,   constructComponentName,   createBufferStrategy,   createBufferStrategy,   deliverMouseWheelToAncestor,   dispatchEventImpl,   dispatchMouseWheelToAncestor,   dispose,   disposeImpl,   doDispose,   eventEnabled,   getAccessibleContext,   getAllUnblockedWindows,   getAllWindows,   getBackground,   getBufferStrategy,   getContainer,   getDocumentRoot,   getFocusCycleRootAncestor,   getFocusOwner,   getFocusTraversalKeys,   getFocusableWindowState,   getIconImages,   getInputContext,   getListeners,   getLocale,   getLocationOnWindow,   getModalBlocker,   getModalExclusionType,   getMostRecentFocusOwner,   getOpacity,   getOwnedWindows,   getOwnedWindows_NoClientCode,   getOwner,   getOwner_NoClientCode,   getOwnerlessWindows,   getShape,   getTemporaryLostComponent,   getToolkit,   getType,   getWarningString,   getWindowFocusListeners,   getWindowListeners,   getWindowStateListeners,   getWindows,   hide,   isActive,   isAlwaysOnTop,   isAlwaysOnTopSupported,   isAutoRequestFocus,   isFocusCycleRoot,   isFocusableWindow,   isFocused,   isLocationByPlatform,   isModalBlocked,   isModalExcluded,   isOpaque,   isRecursivelyVisible,   isShowing,   isValidateRoot,   mixOnReshaping,   pack,   paint,   postEvent,   postProcessKeyEvent,   postWindowEvent,   preProcessKeyEvent,   processEvent,   processWindowEvent,   processWindowFocusEvent,   processWindowStateEvent,   removeNotify,   removeOwnedWindow,   removeWindowFocusListener,   removeWindowListener,   removeWindowStateListener,   reshape,   setAlwaysOnTop,   setAutoRequestFocus,   setBackground,   setBounds,   setBounds,   setClientSize,   setCursor,   setFocusCycleRoot,   setFocusableWindowState,   setGraphicsConfiguration,   setIconImage,   setIconImages,   setLocation,   setLocation,   setLocationByPlatform,   setLocationRelativeTo,   setMinimumSize,   setModalBlocked,   setModalExclusionType,   setOpacity,   setShape,   setSize,   setSize,   setTemporaryLostComponent,   setType,   setVisible,   show,   toBack,   toBack_NoClientCode,   toFront,   toFront_NoClientCode,   updateChildFocusableWindowState,   updateChildrenBlocking,   updateZOrder
                              Methods from java.awt.Container:
                              add,   add,   add,   add,   add,   addContainerListener,   addImpl,   addNotify,   addPropertyChangeListener,   addPropertyChangeListener,   adjustDecendantsOnParent,   adjustDescendants,   adjustListeningChildren,   applyComponentOrientation,   areFocusTraversalKeysSet,   canContainFocusOwner,   checkGD,   clearCurrentFocusCycleRootOnHide,   clearMostRecentFocusOwnerOnHide,   containsFocus,   countComponents,   countHierarchyMembers,   createChildHierarchyEvents,   createHierarchyEvents,   decreaseComponentCount,   deliverEvent,   dispatchEventImpl,   dispatchEventToSelf,   doLayout,   eventEnabled,   findComponentAt,   findComponentAt,   findComponentAt,   findComponentAtImpl,   getAccessibleAt,   getAccessibleChild,   getAccessibleChildrenCount,   getAlignmentX,   getAlignmentY,   getComponent,   getComponentAt,   getComponentAt,   getComponentCount,   getComponentZOrder,   getComponents,   getComponentsSync,   getComponents_NoClientCode,   getContainerListeners,   getDropTargetEventTarget,   getFocusTraversalKeys,   getFocusTraversalPolicy,   getHeavyweightContainer,   getInsets,   getLayout,   getListeners,   getMaximumSize,   getMinimumSize,   getMouseEventTarget,   getMousePosition,   getOpaqueShape,   getPreferredSize,   getTraversalRoot,   hasHeavyweightDescendants,   hasLightweightDescendants,   increaseComponentCount,   initializeFocusTraversalKeys,   insets,   invalidate,   invalidateParent,   invalidateTree,   isAncestorOf,   isFocusCycleRoot,   isFocusCycleRoot,   isFocusTraversalPolicyProvider,   isFocusTraversalPolicySet,   isRecursivelyVisibleUpToHeavyweightContainer,   isSameOrAncestorOf,   isValidateRoot,   layout,   lightweightPaint,   lightweightPrint,   list,   list,   locate,   minimumSize,   mixOnHiding,   mixOnReshaping,   mixOnShowing,   mixOnValidating,   mixOnZOrderChanging,   numListening,   paint,   paintComponents,   paintHeavyweightComponents,   paramString,   postProcessKeyEvent,   postsOldMouseEvents,   preProcessKeyEvent,   preferredSize,   print,   printComponents,   printHeavyweightComponents,   processContainerEvent,   processEvent,   proxyEnableEvents,   recursiveApplyCurrentShape,   recursiveApplyCurrentShape,   recursiveApplyCurrentShape,   recursiveSubtractAndApplyShape,   recursiveSubtractAndApplyShape,   recursiveSubtractAndApplyShape,   remove,   remove,   removeAll,   removeContainerListener,   removeNotify,   setComponentZOrder,   setFocusCycleRoot,   setFocusTraversalKeys,   setFocusTraversalPolicy,   setFocusTraversalPolicyProvider,   setFont,   setLayout,   transferFocusDownCycle,   update,   updateGraphicsData,   validate,   validateTree,   validateUnconditionally
                              Methods from java.awt.Component:
                              action,   add,   addComponentListener,   addFocusListener,   addHierarchyBoundsListener,   addHierarchyListener,   addInputMethodListener,   addKeyListener,   addMouseListener,   addMouseMotionListener,   addMouseWheelListener,   addNotify,   addPropertyChangeListener,   addPropertyChangeListener,   adjustListeningChildrenOnParent,   applyComponentOrientation,   applyCompoundShape,   applyCurrentShape,   areBoundsValid,   areFocusTraversalKeysSet,   areInputMethodsEnabled,   autoProcessMouseWheel,   bounds,   canBeFocusOwner,   canBeFocusOwnerRecursively,   checkGD,   checkImage,   checkImage,   checkTreeLock,   checkWindowClosingException,   clearCurrentFocusCycleRootOnHide,   clearMostRecentFocusOwnerOnHide,   coalesceEvents,   constructComponentName,   contains,   contains,   containsFocus,   countHierarchyMembers,   createBufferStrategy,   createBufferStrategy,   createHierarchyEvents,   createImage,   createImage,   createVolatileImage,   createVolatileImage,   deliverEvent,   disable,   disableEvents,   dispatchEvent,   dispatchEventImpl,   dispatchMouseWheelToAncestor,   doLayout,   enable,   enable,   enableEvents,   enableInputMethods,   eventEnabled,   eventTypeEnabled,   findUnderMouseInWindow,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   firePropertyChange,   getAccessControlContext,   getAccessibleContext,   getAccessibleIndexInParent,   getAccessibleStateSet,   getAlignmentX,   getAlignmentY,   getBackBuffer,   getBackground,   getBaseline,   getBaselineResizeBehavior,   getBounds,   getBounds,   getBoundsOp,   getBufferStrategy,   getColorModel,   getComponentAt,   getComponentAt,   getComponentListeners,   getComponentOrientation,   getContainer,   getContainingWindow,   getCursor,   getCursor_NoClientCode,   getDropTarget,   getFocusCycleRootAncestor,   getFocusListeners,   getFocusTraversalKeys,   getFocusTraversalKeysEnabled,   getFocusTraversalKeys_NoIDCheck,   getFont,   getFontMetrics,   getFont_NoClientCode,   getForeground,   getGraphics,   getGraphicsConfiguration,   getGraphicsConfiguration_NoClientCode,   getGraphics_NoClientCode,   getHWPeerAboveMe,   getHeight,   getHierarchyBoundsListeners,   getHierarchyListeners,   getIgnoreRepaint,   getInputContext,   getInputMethodListeners,   getInputMethodRequests,   getKeyListeners,   getListeners,   getLocale,   getLocation,   getLocation,   getLocationOnScreen,   getLocationOnScreen_NoTreeLock,   getLocationOnWindow,   getMaximumSize,   getMinimumSize,   getMouseListeners,   getMouseMotionListeners,   getMousePosition,   getMouseWheelListeners,   getName,   getNativeContainer,   getNextFocusCandidate,   getNormalShape,   getObjectLock,   getOpaqueShape,   getParent,   getParent_NoClientCode,   getPeer,   getPreferredSize,   getPropertyChangeListeners,   getPropertyChangeListeners,   getSiblingIndexAbove,   getSiblingIndexBelow,   getSize,   getSize,   getToolkit,   getToolkitImpl,   getTraversalRoot,   getTreeLock,   getWidth,   getX,   getY,   gotFocus,   handleEvent,   hasFocus,   hide,   imageUpdate,   initializeFocusTraversalKeys,   inside,   invalidate,   invalidateIfValid,   invalidateParent,   isAutoFocusTransferOnDisposal,   isBackgroundSet,   isCoalescingEnabled,   isCursorSet,   isDisplayable,   isDoubleBuffered,   isEnabled,   isEnabledImpl,   isFocusCycleRoot,   isFocusOwner,   isFocusTraversable,   isFocusTraversableOverridden,   isFocusable,   isFontSet,   isForegroundSet,   isInstanceOf,   isLightweight,   isMaximumSizeSet,   isMinimumSizeSet,   isMixingNeeded,   isNonOpaqueForMixing,   isOpaque,   isPreferredSizeSet,   isRecursivelyVisible,   isSameOrAncestorOf,   isShowing,   isValid,   isVisible,   isVisible_NoClientCode,   keyDown,   keyUp,   layout,   lightweightPaint,   lightweightPrint,   list,   list,   list,   list,   list,   locate,   location,   lostFocus,   minimumSize,   mixOnHiding,   mixOnReshaping,   mixOnShowing,   mixOnValidating,   mixOnZOrderChanging,   mouseDown,   mouseDrag,   mouseEnter,   mouseExit,   mouseMove,   mouseUp,   move,   nextFocus,   numListening,   paint,   paintAll,   paintHeavyweightComponents,   paramString,   pointRelativeToComponent,   postEvent,   postsOldMouseEvents,   preferredSize,   prepareImage,   prepareImage,   print,   printAll,   printHeavyweightComponents,   processComponentEvent,   processEvent,   processFocusEvent,   processHierarchyBoundsEvent,   processHierarchyEvent,   processInputMethodEvent,   processKeyEvent,   processMouseEvent,   processMouseMotionEvent,   processMouseWheelEvent,   relocateComponent,   remove,   removeComponentListener,   removeFocusListener,   removeHierarchyBoundsListener,   removeHierarchyListener,   removeInputMethodListener,   removeKeyListener,   removeMouseListener,   removeMouseMotionListener,   removeMouseWheelListener,   removeNotify,   removePropertyChangeListener,   removePropertyChangeListener,   repaint,   repaint,   repaint,   repaint,   requestFocus,   requestFocus,   requestFocus,   requestFocus,   requestFocusHelper,   requestFocusHelper,   requestFocusInWindow,   requestFocusInWindow,   requestFocusInWindow,   requestFocusInWindow,   reshape,   resize,   resize,   revalidate,   setAutoFocusTransferOnDisposal,   setBackground,   setBounds,   setBounds,   setBoundsOp,   setComponentOrientation,   setCursor,   setDropTarget,   setEnabled,   setFocusTraversalKeys,   setFocusTraversalKeysEnabled,   setFocusTraversalKeys_NoIDCheck,   setFocusable,   setFont,   setForeground,   setGraphicsConfiguration,   setIgnoreRepaint,   setLocale,   setLocation,   setLocation,   setMaximumSize,   setMinimumSize,   setName,   setPreferredSize,   setRequestFocusController,   setSize,   setSize,   setVisible,   show,   show,   size,   subtractAndApplyShape,   subtractAndApplyShapeBelowMe,   toString,   transferFocus,   transferFocus,   transferFocusBackward,   transferFocusBackward,   transferFocusUpCycle,   update,   updateCursorImmediately,   updateGraphicsData,   updateZOrder,   validate
                              Methods from java.lang.Object:
                              clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
                              Method from java.awt.Frame Detail:
                               public  void addNotify() 
                                Makes this Frame displayable by connecting it to a native screen resource. Making a frame displayable will cause any of its children to be made displayable. This method is called internally by the toolkit and should not be called directly by programs.
                               String constructComponentName() 
                                Construct a name for this component. Called by getName() when the name is null.
                               public AccessibleContext getAccessibleContext() 
                                Gets the AccessibleContext associated with this Frame. For frames, the AccessibleContext takes the form of an AccessibleAWTFrame. A new AccessibleAWTFrame instance is created if necessary.
                               public int getCursorType() 
                              Deprecated! As - of JDK version 1.1, replaced by Component.getCursor().

                               public int getExtendedState() 
                                Gets the state of this frame. The state is represented as a bitwise mask.
                                • NORMAL
                                  Indicates that no state bits are set.
                                • ICONIFIED
                                • MAXIMIZED_HORIZ
                                • MAXIMIZED_VERT
                                • MAXIMIZED_BOTH
                                  Concatenates MAXIMIZED_HORIZ and MAXIMIZED_VERT.
                               public static Frame[] getFrames() 
                                Returns an array of all {@code Frame}s created by this application. If called from an applet, the array includes only the {@code Frame}s accessible by that applet.

                                Warning: this method may return system created frames, such as a shared, hidden frame which is used by Swing. Applications should not assume the existence of these frames, nor should an application assume anything about these frames such as component positions, LayoutManagers or serialization.

                                Note: To obtain a list of all ownerless windows, including ownerless {@code Dialog}s (introduced in release 1.6), use Window.getOwnerlessWindows .

                               public Image getIconImage() 
                                Returns the image to be displayed as the icon for this frame.

                                This method is obsolete and kept for backward compatibility only. Use Window.getIconImages() instead.

                                If a list of several images was specified as a Window's icon, this method will return the first item of the list.

                               public Rectangle getMaximizedBounds() 
                                Gets maximized bounds for this frame. Some fields may contain Integer.MAX_VALUE to indicate that system supplied values for this field must be used.
                               public MenuBar getMenuBar() 
                                Gets the menu bar for this frame.
                               public synchronized int getState() 
                                Gets the state of this frame (obsolete).

                                In older versions of JDK a frame state could only be NORMAL or ICONIFIED. Since JDK 1.4 set of supported frame states is expanded and frame state is represented as a bitwise mask.

                                For compatibility with old programs this method still returns Frame.NORMAL and Frame.ICONIFIED but it only reports the iconic state of the frame, other aspects of frame state are not reported by this method.

                               public String getTitle() 
                                Gets the title of the frame. The title is displayed in the frame's border.
                               public boolean isResizable() 
                                Indicates whether this frame is resizable by the user. By default, all frames are initially resizable.
                               public boolean isUndecorated() 
                                Indicates whether this frame is undecorated. By default, all frames are initially decorated.
                               protected String paramString() 
                                Returns a string representing the state of this Frame. 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.
                                void postProcessKeyEvent(KeyEvent e) 
                               public  void remove(MenuComponent m) 
                                Removes the specified menu bar from this frame.
                               public  void removeNotify() 
                                Makes this Frame undisplayable by removing its connection to its native screen resource. Making a Frame undisplayable will cause any of its children to be made undisplayable. This method is called by the toolkit internally and should not be called directly by programs.
                               public  void setBackground(Color bgColor) 
                                {@inheritDoc}
                               public  void setCursor(int cursorType) 
                              Deprecated! As - of JDK version 1.1, replaced by Component.setCursor(Cursor).

                               public  void setExtendedState(int state) 
                                Sets the state of this frame. The state is represented as a bitwise mask.
                                • NORMAL
                                  Indicates that no state bits are set.
                                • ICONIFIED
                                • MAXIMIZED_HORIZ
                                • MAXIMIZED_VERT
                                • MAXIMIZED_BOTH
                                  Concatenates MAXIMIZED_HORIZ and MAXIMIZED_VERT.

                                Note that if the state is not supported on a given platform, neither the state nor the return value of the #getExtendedState method will be changed. The application may determine whether a specific state is supported via the java.awt.Toolkit#isFrameStateSupported method.

                                If the frame is currently visible on the screen (the #isShowing method returns {@code true}), the developer should examine the return value of the java.awt.event.WindowEvent#getNewState method of the {@code WindowEvent} received through the java.awt.event.WindowStateListener to determine that the state has actually been changed.

                                If the frame is not visible on the screen, the events may or may not be generated. In this case the developer may assume that the state changes immediately after this method returns. Later, when the {@code setVisible(true)} method is invoked, the frame will attempt to apply this state. Receiving any java.awt.event.WindowEvent#WINDOW_STATE_CHANGED events is not guaranteed in this case also.

                               public  void setIconImage(Image image) 
                                {@inheritDoc}
                               public  void setMaximizedBounds(Rectangle bounds) 
                                Sets the maximized bounds for this frame.

                                When a frame is in maximized state the system supplies some defaults bounds. This method allows some or all of those system supplied values to be overridden.

                                If bounds is null, accept bounds supplied by the system. If non-null you can override some of the system supplied values while accepting others by setting those fields you want to accept from system to Integer.MAX_VALUE.

                                Note, the given maximized bounds are used as a hint for the native system, because the underlying platform may not support setting the location and/or size of the maximized windows. If that is the case, the provided values do not affect the appearance of the frame in the maximized state.

                               public  void setMenuBar(MenuBar mb) 
                                Sets the menu bar for this frame to the specified menu bar.
                               public  void setOpacity(float opacity) 
                                {@inheritDoc}
                               public  void setResizable(boolean resizable) 
                                Sets whether this frame is resizable by the user.
                               public  void setShape(Shape shape) 
                                {@inheritDoc}
                               public synchronized  void setState(int state) 
                                Sets the state of this frame (obsolete).

                                In older versions of JDK a frame state could only be NORMAL or ICONIFIED. Since JDK 1.4 set of supported frame states is expanded and frame state is represented as a bitwise mask.

                                For compatibility with applications developed earlier this method still accepts {@code Frame.NORMAL} and {@code Frame.ICONIFIED} only. The iconic state of the frame is only changed, other aspects of frame state are not affected by this method. If the state passed to this method is neither {@code Frame.NORMAL} nor {@code Frame.ICONIFIED} the method performs no actions at all.

                                Note that if the state is not supported on a given platform, neither the state nor the return value of the #getState method will be changed. The application may determine whether a specific state is supported via the java.awt.Toolkit#isFrameStateSupported method.

                                If the frame is currently visible on the screen (the #isShowing method returns {@code true}), the developer should examine the return value of the java.awt.event.WindowEvent#getNewState method of the {@code WindowEvent} received through the java.awt.event.WindowStateListener to determine that the state has actually been changed.

                                If the frame is not visible on the screen, the events may or may not be generated. In this case the developer may assume that the state changes immediately after this method returns. Later, when the {@code setVisible(true)} method is invoked, the frame will attempt to apply this state. Receiving any java.awt.event.WindowEvent#WINDOW_STATE_CHANGED events is not guaranteed in this case also.

                               public  void setTitle(String title) 
                                Sets the title for this frame to the specified string.
                               public  void setUndecorated(boolean undecorated) 
                                Disables or enables decorations for this frame.

                                This method can only be called while the frame is not displayable. To make this frame decorated, it must be opaque and have the default shape, otherwise the {@code IllegalComponentStateException} will be thrown. Refer to Window#setShape , Window#setOpacity and Window#setBackground for details