Loading an image in an applet can be done in its load method. After init method is called by the browser automatically at initialization of the applet, we can draw loaded image in paint method using <i<drawImage method of the applet. Note that paint method is automatically called too whenever applet needs to be redrawn.

 Image image;

public void init() {
    // Load image
    image = getImage(getDocumentBase(), "http://hostname/image.gif");

public void paint(Graphics g) {
    // Draw image
    g.drawImage(image, 0, 0, this);