import java.awt.*; import java.awt.event.*; import java.applet.Applet; public class Liigu1 extends Applet implements MouseMotionListener{ public Liigu1(){ addMouseMotionListener(this); } public void mouseMoved(MouseEvent e){} public void mouseDragged(MouseEvent e){ Graphics g=this.getGraphics(); g.setColor(Color.white); g.fillRect(0, 0, getSize().width, getSize().height); g.setColor(Color.black); g.drawOval(e.getX()-5, e.getY()-5, 10, 10); } public static void main(String argumendid[]){ Frame f=new Frame(); f.add(new Liigu1()); f.setSize(200, 200); f.setVisible(true); } }