For a preexisting image:
Image img = Image.createImage("/image.png"); //load the image
Displaying the image depends on whether you are using a Form or a Canvas. For a Form you simply append the image to the form:
form.append(img);
It will be displayed in the order that you appended it to the form.
For a Canvas you must use the Graphics object to put it on the screen:
g.drawImage(img, x, y, anchor);
The drawing of an image in a Canvas is normally done in the canvas.paint(Graphics g) method.
To access the PNG file it must be packaged into the MIDlet suite's JAR file. Otherwise, you download it as a binary using HTTP. If your images
are in an "images" directory then your code would look something like this:
Image image = null;
try
{
image = Image.createImage( "/images/foo.png" );
}
catch(IOException e)
{
}