/** * Copyright (c): Uwe Schmidt, FH Wedel * * You may study, modify and distribute this source code * FOR NON-COMMERCIAL PURPOSES ONLY. * This copyright message has to remain unchanged. * * Note that this document is provided 'as is', * WITHOUT WARRANTY of any kind either expressed or implied. */ import java.awt.Graphics; import java.awt.Image; import javax.swing.JApplet; public class ImageTest extends JApplet { Image image; public void init() { image = getImage(getDocumentBase(), getParameter("image")); } public void destroy() { if ( image != null ) image.flush(); } public void paint(Graphics g) { g.drawImage(image,0,0,this); } public void update(Graphics g) { paint(g); } }