jQuery in Action, 3rd edition
The moose likes Applets and the fly likes JApplet overlaping png images. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "JApplet overlaping png images." Watch "JApplet overlaping png images." New topic

JApplet overlaping png images.

Alec Porter

Joined: Sep 05, 2010
Posts: 29
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.
I agree. Here's the link: http://aspose.com/file-tools
subject: JApplet overlaping png images.
jQuery in Action, 3rd edition