I have got this very weird bug from trying to display a png file.
Consider the code below.
Image selectedPlayer = null ;
if(this.playerSelected == 0)
selectedPlayer = Image.createImage("/brucelee.png");
}else if(this.playerSelected == 1)
selectedPlayer = Image.createImage("/biker.png");
System.out.println("problem with loading the biker");
g.drawImage(selectedPlayer, this.screenWidth/2, this.screenHeight/2, Graphics.TOP+Graphics.LEFT);*/
The strange thing is is that the first image (bruce lee) is displayed perfectly while the second (biker) is not displayed even though the image object exists. I'm totally bamboozled as to what is going on. It is not the image either because in another part of the code i can display that troublesome image without any hitchs?!
Any help would be very much appreciated.