try{
imgball = Image.createImage("/ball.jpg");
//imgpad = Image.createImage("/ball.jpg");
}
catch(Exception e)
{}
The above code works as it is. But when i open imgpad statement, it gives me error of uncaught NullPointerException ? What can be wrong ?
P.S. I am working in a different Thread. If that matters.
Ok. It was my mistake. I’d like to make it clear here for others to know.
The mistake I made was actually from the main thread. I’d written following :
And I was loading images in the constructor ReflectCanvas(). So it could bear the speed upto one image but not for two 🙂