Seach

load an image to a applet

import java.awt.*;
import java.applet.*;
public class img extends Applet
{
Image i;
public void init()
{
i=getImage(getDocumentBase(),"002.jpg");//getcode base is used to findout the url of the code containing directory
}
public void paint(Graphics g)
{
g.drawImage(i,40,40,this);
}
}
note
pls first  copy the image to the applet class containing folder 

No comments: