Hey guys,

I am making a block breaker type game.

One panel houses the background, and one panel has the bricks, paddle, and such. and the other has the background. In my main class when I add the panels in this order:

add(new BrickBoard());
add(panelbg);

the background image shows up over top of the bricks, and when I reverse it to:

add(panelbg);
add(new BrickBoard());

the bricks show up and the background is plain grey as per usual.

How can I fix this?

Thanks Jon

Edited 6 Years Ago by PhiberOptik: n/a

Have you tried adding the brickboard to the panelbg rather than to the window?

Hi darkagn, thanks for the reply,

That is a great idea unfortunately it didn't do the trick.

I had another idea, maybe I could make the background on the brickboard slightly translucent...?

Any other ideas?

Hey sorry about the long reply time.

So I figured the best way to get this working properly is to merge it all into one panel, and I just need to get it to render the background first then the blocks, paddle, etc.

Fixed:

Altered the draw settings works great thanks guys!

Edited 6 Years Ago by PhiberOptik: n/a

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