Java JLayeredPane

The JLayeredPane class is used to add depth to swing container. It is used to provide a third dimension for positioning component and divide the depth-range into several different layers.

JLayeredPane class declaration

public class JLayeredPane extends JComponent implements Accessible

Commonly used Constructors:

Constructor Description
JLayeredPane It is used to create a new JLayeredPane

Commonly used Methods:

Method Description
int getIndexOf(Component c) It is used to return the index of the specified Component.
int getLayer(Component c) It is used to return the layer attribute for the specified Component.
int getPosition(Component c) It is used to return the relative position of the component within its layer.

Java JLayeredPane Example

Flash Soon


Output


Advertisement

© Sapster 2017