JPanel

Palette category
Swing
Palette bean
JPanel
Project
JFC class libraries
Package
com.sun.java.swing
Type
JPanel

Use a JPanel bean as a composition surface for other user interface components, such as buttons, lists, and text. You can add a panel to a window, an applet, or another panel. In a Swing window or JApplet, a JPanel can either serve as the contentPane, or be added to the contentPane.

Use a Panel bean, rather than a JPanel bean, if you want to use AWT components in the panel. Although Swing and AWT beans can be mixed, it is inadvisable.


Related procedures
Adding a Pane or Panel

Related references
Pane and Panel Beans
Beans for Visual Composition