• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

JApplet overlaping png images.  RSS feed

 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!