W3cubDocs

/OpenJDK 8 GUI

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:
JDK1.0
See Also:
FlowLayout, Serialized Form

Nested Classes

Nested Classes
Modifier and Type Class and Description
protected class  Panel.AccessibleAWTPanel

This class implements accessibility support for the Panel class.

Nested classes/interfaces inherited from class java.awt.Container

Container.AccessibleAWTContainer

Nested classes/interfaces inherited from class java.awt.Component

Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy

Fields

Fields inherited from class java.awt.Component

accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT

Fields inherited from interface java.awt.image.ImageObserver

ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH

Constructors

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:
JDK1.1

Methods

addNotify

public void addNotify()

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

Overrides:
addNotify in class Container
See Also:
Component.isDisplayable(), Container.removeNotify()

getAccessibleContext

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.

Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Component
Returns:
an AccessibleAWTPanel that serves as the AccessibleContext of this Panel
Since:
1.3

© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.