I'm having problems with painting the layers in my swing components. More specifically, I have custom components for ContentPane(The base layer), LayeredPane(the multiple layered middle), and glassPane (for the top layer). How do I prevent certain layers within the layered pane, or contentpane from being erased and repainted?