Mega Code Archive
The JLayeredPane serves as the main component container of a JRootPane
Integer layer = new Integer(20);
aLayeredPane.add(aComponent, layer);
Using public void setLayer(Component comp, int layer) or public void setLayer(Component comp, int layer, int position) method before adding the component to the JLayeredPane.
aLayeredPane.setLayer(aComponent, 10);
aLayeredPane.add(aComponent);