posted 23 years ago
thanks sebastein and chanoch for the replies.I tried the way which Sebastein has suggested but it didnot work.I will be a little more specific with my problem .
*Form f = new Form("Hello MIDlet");
try {
img = Image.createImage("/snake.png");
}
catch (IOException ioe) {ioe.printStackTrace();}
*ImageItem ii = new ImageItem("snake ",img,ImageItem.LAYOUT_RIGHT,null);
*f.append(ii);
message=""+a+" "+b+"hello";
g.drawImage(img, 0, 0, g.TOP|g.LEFT);
This the code i am using to draw images in the midlet.* is for the code which sebastein has suggested.When i write the java file and build a jar and jad file it works with the mobile phone emulators.But when i conver this file in to prc file with the j2me toolkit it doesnot work .My guess is that it is not able to load the image in the try block but it doenot throw any exception and the screen remains blank.can u please suggest me any remedy or send me complete sample code for loading the images .This is very urgent.
Thank u