FileDocCategorySizeDatePackage
AnonymousSpot.javaAPI DocExample642Tue Dec 12 18:58:16 GMT 2000None

AnonymousSpot

public class AnonymousSpot extends Applet

Fields Summary
private Point
clickPoint
private static final int
RADIUS
Constructors Summary
Methods Summary
public voidinit()


       
	addMouseListener(
	    new MouseAdapter() {
		public void mousePressed(MouseEvent event) {
		    clickPoint = event.getPoint();
		    repaint();
		}
	    }
	);
    
public voidpaint(java.awt.Graphics g)

        g.drawRect(0, 0, getSize().width - 1,
			 getSize().height - 1);
        if (clickPoint != null)
	    g.fillOval(clickPoint.x-RADIUS,
		       clickPoint.y-RADIUS,
		       RADIUS*2, RADIUS*2);