| Package | Description | 
|---|---|
| java.awt | Contains all of the classes for creating user
interfaces and for painting graphics and images. | 
| java.awt.event | Provides interfaces and classes for dealing with different
types of events fired by AWT components. | 
| java.awt.im.spi | Provides interfaces that enable the development of input methods
that can be used with any Java runtime environment. | 
| javax.swing | Provides a set of "lightweight"
(all-Java language) components that,
to the maximum degree possible, work the same on all platforms. | 
| javax.swing.plaf.basic | Provides user interface objects built according to the
Basic look and feel. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | DialogA Dialog is a top-level window with a title and a border
 that is typically used to take some form of input from the user. | 
| class  | FileDialogThe  FileDialogclass displays a dialog window
 from which the user can select a file. | 
| class  | FrameA  Frameis a top-level window with a title and a border. | 
| Modifier and Type | Method and Description | 
|---|---|
| Window | KeyboardFocusManager. getActiveWindow()Returns the active Window, if the active Window is in the same context
 as the calling thread. | 
| Window | KeyboardFocusManager. getFocusedWindow()Returns the focused Window, if the focused Window is in the same context
 as the calling thread. | 
| Window | GraphicsDevice. getFullScreenWindow()Returns the  Windowobject representing the
 full-screen window if the device is in full-screen mode. | 
| protected Window | KeyboardFocusManager. getGlobalActiveWindow()Returns the active Window, even if the calling thread is in a different
 context than the active Window. | 
| protected Window | KeyboardFocusManager. getGlobalFocusedWindow()Returns the focused Window, even if the calling thread is in a different
 context than the focused Window. | 
| Window[] | Window. getOwnedWindows()Return an array containing all the windows this
 window currently owns. | 
| Window | Window. getOwner()Returns the owner of this window. | 
| static Window[] | Window. getOwnerlessWindows()Returns an array of all  Windows created by this application
 that have no owner. | 
| static Window[] | Window. getWindows()Returns an array of all  Windows, both owned and ownerless,
 created by this application. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract java.awt.peer.WindowPeer | Toolkit. createWindow(Window target)Creates this toolkit's implementation of  Windowusing
 the specified peer interface. | 
| Component | FocusTraversalPolicy. getInitialComponent(Window window)Returns the Component that should receive the focus when a Window is
 made visible for the first time. | 
| void | GraphicsDevice. setFullScreenWindow(Window w)Enter full-screen mode, or return to windowed mode. | 
| protected void | KeyboardFocusManager. setGlobalActiveWindow(Window activeWindow)Sets the active Window. | 
| protected void | KeyboardFocusManager. setGlobalFocusedWindow(Window focusedWindow)Sets the focused Window. | 
| Constructor and Description | 
|---|
| Dialog(Window owner)Constructs an initially invisible, modeless  Dialogwith the
 specified ownerWindowand an empty title. | 
| Dialog(Window owner,
      Dialog.ModalityType modalityType)Constructs an initially invisible  Dialogwith the
 specified ownerWindowand modality and an empty title. | 
| Dialog(Window owner,
      String title)Constructs an initially invisible, modeless  Dialogwith
 the specified ownerWindowand title. | 
| Dialog(Window owner,
      String title,
      Dialog.ModalityType modalityType)Constructs an initially invisible  Dialogwith the
 specified ownerWindow, title and modality. | 
| Dialog(Window owner,
      String title,
      Dialog.ModalityType modalityType,
      GraphicsConfiguration gc)Constructs an initially invisible  Dialogwith the
 specified ownerWindow, title, modality andGraphicsConfiguration. | 
| Window(Window owner)Constructs a new, initially invisible window with the specified
  Windowas its owner. | 
| Window(Window owner,
      GraphicsConfiguration gc)Constructs a new, initially invisible window with the specified owner
  Windowand aGraphicsConfigurationof a screen device. | 
| Modifier and Type | Method and Description | 
|---|---|
| Window | WindowEvent. getOppositeWindow()Returns the other Window involved in this focus or activation change. | 
| Window | WindowEvent. getWindow()Returns the originator of the event. | 
| Constructor and Description | 
|---|
| WindowEvent(Window source,
           int id)Constructs a  WindowEventobject. | 
| WindowEvent(Window source,
           int id,
           int oldState,
           int newState)Constructs a  WindowEventobject with the specified
 previous and new window states. | 
| WindowEvent(Window source,
           int id,
           Window opposite)Constructs a  WindowEventobject with the
 specified oppositeWindow. | 
| WindowEvent(Window source,
           int id,
           Window opposite,
           int oldState,
           int newState)Constructs a  WindowEventobject. | 
| Modifier and Type | Method and Description | 
|---|---|
| Window | InputMethodContext. createInputMethodWindow(String title,
                       boolean attachToInputContext)Creates a top-level window for use by the input method. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | JDialogThe main class for creating a dialog window. | 
| class  | JFrameAn extended version of  java.awt.Framethat adds support for
 the JFC/Swing component architecture. | 
| class  | JWindowA  JWindowis a container that can be displayed anywhere on the
 user's desktop. | 
| Modifier and Type | Method and Description | 
|---|---|
| static Window | SwingUtilities. getWindowAncestor(Component c)Returns the first  Window ancestor ofc, ornullifcis not contained inside aWindow. | 
| static Window | SwingUtilities. windowForComponent(Component c)Returns the first  Window ancestor ofc, ornullifcis not contained inside aWindow. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | RepaintManager. addDirtyRegion(Window window,
              int x,
              int y,
              int w,
              int h)Adds  windowto the list ofComponents that
 need to be repainted. | 
| Constructor and Description | 
|---|
| JDialog(Window owner)Creates a modeless dialog with the specified  Windowas its owner and an empty title. | 
| JDialog(Window owner,
       Dialog.ModalityType modalityType)Creates a dialog with an empty title and the specified modality and
  Windowas its owner. | 
| JDialog(Window owner,
       String title)Creates a modeless dialog with the specified title and owner
  Window. | 
| JDialog(Window owner,
       String title,
       Dialog.ModalityType modalityType)Creates a dialog with the specified title, owner  Windowand
 modality. | 
| JDialog(Window owner,
       String title,
       Dialog.ModalityType modalityType,
       GraphicsConfiguration gc)Creates a dialog with the specified title, owner  Window,
 modality andGraphicsConfiguration. | 
| JWindow(Window owner)Creates a window with the specified owner window. | 
| JWindow(Window owner,
       GraphicsConfiguration gc)Creates a window with the specified owner window and
  GraphicsConfigurationof a screen device. | 
| Modifier and Type | Class and Description | 
|---|---|
| protected class  | BasicToolBarUI.DragWindow | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2017, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.