JFrames
JFrame is a top-level window provided by the Swing library for Java applications. It represents a window on the screen with a title bar, borders, and standard window controls, and it serves as the main container for a Swing-based user interface. A JFrame is a subclass of java.awt.Frame and, as a Swing top-level container, contains a root pane that coordinates a layered pane, a content pane, and a glass pane.
Components are typically added to the frame’s content pane. Although modern code can call add(component) directly
Common operations include setting the title (setTitle), size or preferred size (setSize, pack), resizability (setResizable), and
Frames should be created and updated on the Event Dispatch Thread, as Swing is not fully thread-safe.
JFrame is commonly used as the main window, while auxiliary windows are created with JDialog or JWindow.