Hi, Does anybody know the proper way to display a single .png image using the Image and ImageItem UI classes? I�m currently using codewarrior for java in order to test my j2me apps and it is unable to load the image which is stored in the root project directory. I would really thank a sample code or any other resource.
posted 15 years ago
You place the image (in PNG format) in your MIDlet suite's JAR file and then you have code like this: Image img = Image.createImage( "/images/myimage.png" ); This assumes the image is stored as image/myimage.png, of course.