Hi people,

I'm trying to display an image (gif image) in an applet,
however, it does not show up when the applet is run.

Here is my code:
---------------------------------------------------------
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Image;

// An applet that loads an image and
// displays it.

public class DrawImage extends Applet
{
Image image; //an 'Image' object

//initialise applet
public void init()
{
//Load Image into object 'image'
//URL url , String file
image = getImage(getCodeBase(), "gifpic.gif");
}

//applet's paint function
public void paint(Graphics g)
{
if(image != null)
{ //if image is found then drawImage()
g.drawImage(image, 0, 0, this);
}
else
{ //if image is not found, then display message
System.out.println("image not found");
}
}
}
-----------------------------------------------------------------------