Module java.desktop
Package java.awt

Class Panel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
Applet

public class Panel
extends Container
implements Accessible
Panel is the simplest container class. A panel provides space in which an application can attach any other component, including other panels.

The default layout manager for a panel is the FlowLayout layout manager.

Since:
1.0
See Also:
FlowLayout, Serialized Form
  • Constructor Details

    • Panel

      public Panel()
      Creates a new panel using the default layout manager. The default layout manager for all panels is the FlowLayout class.
    • Panel

      public Panel​(LayoutManager layout)
      Creates a new panel with the specified layout manager.
      Parameters:
      layout - the layout manager for this panel.
      Since:
      1.1
  • Method Details