Hi,
I have got this very weird bug from trying to display a png file.
Consider the code below.
if(i==this.playerSelected){
Image selectedPlayer = null ;
if(this.playerSelected == 0)
{
try{
selectedPlayer = Image.createImage("/brucelee.png");
}catch(Exception ex){
ex.printStackTrace();
}
}else if(this.playerSelected == 1)
{
try{
selectedPlayer = Image.createImage("/biker.png");
}catch(Exception ex){
ex.printStackTrace();
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.
Conor