public void init(){ img = getImage(getDocumentBase(),"my.gif"); } public void paint(Graphics g){ g.drawImage("my.gif",0,0,this); } That should draw the image in your applet window.
public void paint(Graphics g){ g.clipRect(10,10,10,10); g.drawImage("my.gif",0,0,this); }This could be useful for drawing parts of an image in various places. Eg.
public void paint(Graphics g){ g.clipRect(10,10,10,10); g.drawImage("my.gif",0,0,this); g = getGraphics(); //reset clipRect g.clipRect(20,20,10,10); g.drawImage("my.gif",10,10,this); } This would draw the same sub-image in two places.