Reputation: 1
We have a group project where we must create a turn based, 2 player, grid game for class, i.e. Chutes and Ladders. The whole project is done except for the fact that when we bring the background image up, the players pieces get painted behind the background, and are therefore not visible. Is there a way to get the pieces to show up on top of the background image? We are using imageIO for the image, GridLayout for the Grid, and then using PaintComponent to place the pieces on the grid. When we do not have the background image, the pieces show up on the Grid flawlessly.
Upvotes: 0
Views: 67
Reputation: 285405
using PaintComponent to place the pieces on the grid
paintComponent(...)
method first thing in your paintComponent override.For more help, post code and give more details. To be honest, I'm a little surprised that you haven't even posted your paintComponent method code.
Upvotes: 2