Javatpoint Logo
Javatpoint Logo

Java JPanel

The JPanel is a simplest container class. It provides space in which an application can attach any other component. It inherits the JComponents class.

It doesn't have title bar.

JPanel class declaration

Commonly used Constructors:

Constructor Description
JPanel() It is used to create a new JPanel with a double buffer and a flow layout.
JPanel(boolean isDoubleBuffered) It is used to create a new JPanel with FlowLayout and the specified buffering strategy.
JPanel(LayoutManager layout) It is used to create a new JPanel with the specified layout manager.

Java JPanel Example

Output:

Java Jpanel 1
Next TopicJava JFileChooser




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA