In short, my need is to have a background image in my java application, and at some event, create different graphics on top of that image.
I thought I would use JPanel to draw a background image, add it to my JFrame at the beginning of the program, and then add other JPanels on top of it for certain events. The problem is that Swing gives JPanels by adding the first highest index Z, so that my background will be displayed on top of everything.
Is there a way to manage the Z index / order of JPanels, or am I completely wrong about that?
source
share