public class

Panel

extends Container
implements Accessible
java.lang.Object
   ↳ java.awt.Component
     ↳ java.awt.Container
       ↳ java.awt.Panel
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

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.

See Also

Summary

Nested Classes
class Panel.AccessibleAWTPanel This class implements accessibility support for the Panel class. 
[Expand]
Inherited Constants
From class java.awt.Component
From interface java.awt.image.ImageObserver
Public Constructors
Panel()
Creates a new panel using the default layout manager.
Panel(LayoutManager layout)
Creates a new panel with the specified layout manager.
Public Methods
void addNotify()
Creates the Panel's peer.
AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this Panel.
[Expand]
Inherited Methods
From class java.awt.Container
From class java.awt.Component
From class java.lang.Object
From interface java.awt.MenuContainer
From interface java.awt.image.ImageObserver
From interface javax.accessibility.Accessible

Public Constructors

public Panel ()

Creates a new panel using the default layout manager. The default layout manager for all panels is the FlowLayout class.

public Panel (LayoutManager layout)

Creates a new panel with the specified layout manager.

Parameters
layout the layout manager for this panel.

Public Methods

public void addNotify ()

Creates the Panel's peer. The peer allows you to modify the appearance of the panel without changing its functionality.

public AccessibleContext getAccessibleContext ()

Gets the AccessibleContext associated with this Panel. For panels, the AccessibleContext takes the form of an AccessibleAWTPanel. A new AccessibleAWTPanel instance is created if necessary.

Returns
  • an AccessibleAWTPanel that serves as the AccessibleContext of this Panel