/* * @(#)Applet4.java 1.0 01/11/29 * * You can modify the template of this file in the * directory ..\JCreator\Templates\Template_2\Project_Name.java * * You can also create your own project template by making a new * folder in the directory ..\JCreator\Template\. Use the other * templates as examples. * */ import java.awt.*; import java.applet.*; public class Applet4 extends Applet { Image kuva; int a,b; public void init() { kuva = getImage(getCodeBase(), "java.gif"); } public void paint(Graphics g) { g.drawImage(kuva,a,b,this ); } public boolean mouseDrag (Event e, int x, int y) { a=x; b=y; repaint(); return true; } }