Category: Swing Containers

The JApplet Class

The JApplet Class

JApplet is a simple extension of java.applet.Applet to use when creating Swing programs designed to be used in a web browser (or appletviewer). As a direct subclass of Applet, JApplet is used in much...

The JWindow Class

The JWindow Class

JWindow is an extension of java.awt.Window that uses a JRootPane as its single component. Other than this core distinction, JWindow does not change anything defined by the Window class.

The JFrame Class

The JFrame Class

The most common Swing container for Java applications is the JFrame class. Like java.awt.Frame, JFrame provides a top-level window with a title, border, and other platform-specific adornments (e.g., minimize, maximize, and close buttons). Because...

The JLayeredPane Class

The JLayeredPane Class

We have already seen some of the panes (the glass and content panes, for example) accessible through the JRootPane class. Though it doesn’t make much use of it directly, JRootPane introduces a class called...

The Glass Pane

The Glass Pane

JRootPane may seem a bit confusing at first glance. The important thing to remember is that in most cases, all you need to worry about is adding your component to the content pane and...

The Root Pane

The Root Pane

The JRootPane Class JRootPane is a special container that extends JComponent and is used by many of the other Swing containers. It’s quite different from most containers you’re probably used to using. The first...

A Simple Container

A Simple Container

Swing provides for grouping other components together. In AWT, such components extended java.awt.Container and included Panel, Window, Frame, and Dialog. With Swing, you get a whole new set of options, providing greater flexibility and...

No © Loop and Break