/* * @(#)Applet02.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 Applet02 extends Applet { int a; int b; public void init() { } public void paint(Graphics g) { Font fontti = new Font("Courier", Font.BOLD, 24); g.setFont(fontti); g.drawString("Moi siellä!!", a, b ); } // pyydystetään hiiren napsaus. Ohjelma saa keskeytyksen, jos hiirtä painetaan public boolean mouseUp (Event e, int x, int y) { a=x; b=y; repaint(); return true; } }