Posted By:
Matt_Zipay
Posted On:
Wednesday, April 16, 2003 04:40 PM
This is my file layout: $PROJECT_HOME /junk /sample /res SamplePic.png SampleMIDlet.class In my code, I use the following: Image img = Image.createImage("/SamplePic.png"); But this throws an IOException whose getMessage() method returns null, so it won't even tell me why the image won't load! Can someone please tell me what the problem is? This is excrutiatingly frustrating!!! I have tried placing the image in the same dir as the class, in /res (as above), in /res/images, and in /images (as well as trying these same variations in the createImage() call), but createImage() continues to throw IOException no matter where I put
More>>
This is my file layout:
$PROJECT_HOME
/junk
/sample
/res
SamplePic.png
SampleMIDlet.class
In my code, I use the following:
Image img = Image.createImage("/SamplePic.png");
But this throws an IOException whose getMessage() method returns null, so it won't even tell me why the image won't load!
Can someone please tell me what the problem is?
This is excrutiatingly frustrating!!! I have tried placing the image in the same dir as the class, in /res (as above), in /res/images, and in /images (as well as trying these same variations in the createImage() call), but createImage() continues to throw IOException no matter where I put the image!
<<Less