Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JApplet overlaping png images.  RSS feed

 
Alec Porter
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I'm making a little game that has a background and a player "ship", the problem is I can't get the ship to draw on top of the background. The player is a tranparent png(with alpha channel) 32x32 image. When I try to draw the image over the background tiles it just draws the player. I know its good to have code so this is just an example of how I'm drawing things.



One thing to note is that when I draw the background over the player, I can move to where there isnt a part of the map drawn and I can see the player is draw. So I think it has something to do with the transparency.

Edit: Upon futer examination I've seen that it might have to do with the layout of the contentPane. I will look into this more.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!