Hey guys,

I have two JPanels for my game, one jpanel shows my character, informational text and the other shows the map which is made up of a tileset.

Is there anyway I can show the map behind the character and information without merging the two java files?

the Map jpanel uses PaintComponent() and the Character jpanel uses paint()

Thanks PO

A little update:
So heres what my two panels look like (minus my the scaling difference)
jpanel1 has the character & info. I want to take jpanel2 (which draws the map) and display it behind jpanel1 so the character can run around on top of the picture.

Originally I tried making it so jpanel1 doesn't draw a background
with setOpaque(false); and then in the frame calling them in order of appearance ie:

jPanel2 p2 = new jPanel2();
jPanel1 p1 = new jPanel1();

but that didn't work.

I'm very lost. I don't have a lot of experience with GUI's.

please keep in mind that jPanel2 is a tileset, so its not as easy as just trying to drop it into the jpanel1 paint() method

Thanks for your help!

This question has already been answered. Start a new discussion instead.