| Package | Description | 
|---|---|
| java.awt | Contains all of the classes for creating user
interfaces and for painting graphics and images. | 
| javax.swing | Provides a set of "lightweight"
(all-Java language) components that,
to the maximum degree possible, work the same on all platforms. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| static Frame[] | Frame. getFrames()Returns an array of all  Frames created by this application. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| protected abstract java.awt.peer.FramePeer | Toolkit. createFrame(Frame target)Creates this toolkit's implementation of  Frameusing
 the specified peer interface. | |
| PrintJob | Toolkit. getPrintJob(Frame frame,
           String jobtitle,
           JobAttributes jobAttributes,
           PageAttributes pageAttributes)Gets a  PrintJobobject which is the result of initiating
 a print operation on the toolkit's platform. | |
| abstract PrintJob | Toolkit. getPrintJob(Frame frame,
           String jobtitle,
           Properties props)Gets a  PrintJobobject which is the result of initiating
 a print operation on the toolkit's platform. | 
| Constructor | Description | 
|---|---|
| Dialog(Frame owner)Constructs an initially invisible, modeless  Dialogwith
 the specified ownerFrameand an empty title. | |
| Dialog(Frame owner,
      boolean modal)Constructs an initially invisible  Dialogwith the specified
 ownerFrameand modality and an empty title. | |
| Dialog(Frame owner,
      String title)Constructs an initially invisible, modeless  Dialogwith
 the specified ownerFrameand title. | |
| Dialog(Frame owner,
      String title,
      boolean modal)Constructs an initially invisible  Dialogwith the
 specified ownerFrame, title and modality. | |
| Dialog(Frame owner,
      String title,
      boolean modal,
      GraphicsConfiguration gc)Constructs an initially invisible  Dialogwith the specified ownerFrame, title, modality, andGraphicsConfiguration. | |
| FileDialog(Frame parent)Creates a file dialog for loading a file. | |
| FileDialog(Frame parent,
          String title)Creates a file dialog window with the specified title for loading
 a file. | |
| FileDialog(Frame parent,
          String title,
          int mode)Creates a file dialog window with the specified title for loading
 or saving a file. | |
| Window(Frame owner)Constructs a new, initially invisible window with the specified
  Frameas its owner. | 
| Modifier and Type | Class | Description | 
|---|---|---|
| class  | JFrameAn extended version of  java.awt.Framethat adds support for
 the JFC/Swing component architecture. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| static Frame | JOptionPane. getFrameForComponent(Component parentComponent)Returns the specified component's  Frame. | |
| static Frame | JOptionPane. getRootFrame()Returns the  Frameto use for the class methods in
 which a frame is not provided. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| static void | JOptionPane. setRootFrame(Frame newRootFrame)Sets the frame to use for class methods in which a frame is
 not provided. | 
| Constructor | Description | 
|---|---|
| JDialog(Frame owner)Creates a modeless dialog with the specified  Frameas its owner and an empty title. | |
| JDialog(Frame owner,
       boolean modal)Creates a dialog with an empty title and the specified modality and
  Frameas its owner. | |
| JDialog(Frame owner,
       String title)Creates a modeless dialog with the specified title and
 with the specified owner frame. | |
| JDialog(Frame owner,
       String title,
       boolean modal)Creates a dialog with the specified title, owner  Frameand modality. | |
| JDialog(Frame owner,
       String title,
       boolean modal,
       GraphicsConfiguration gc)Creates a dialog with the specified title,
 owner  Frame, modality andGraphicsConfiguration. | |
| JWindow(Frame owner)Creates a window with the specified owner frame. | 
 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, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.