public static JLayeredPane getLayeredPaneAbove (Component c)

Convenience method that returns the first JLayeredPane which contains the specified component. Note that all JFrames have a JLayeredPane at their root, so any component in a JFrame will have a JLayeredPane parent.

Parameters:
c    the Component to check

Returns:  the JLayeredPane that contains the component, or null if no JLayeredPane is found in the component hierarchy

See also:
JFrame, JRootPane