FileDocCategorySizeDatePackage
Spot.javaAPI DocExample816Tue Dec 12 18:58:18 GMT 2000None

Spot

public class Spot extends Applet implements MouseListener

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


       
	addMouseListener(this);
    
public voidmouseClicked(java.awt.event.MouseEvent event)

public voidmouseEntered(java.awt.event.MouseEvent event)

public voidmouseExited(java.awt.event.MouseEvent event)

public voidmousePressed(java.awt.event.MouseEvent event)

	
	clickPoint = event.getPoint();
	repaint();
    
public voidmouseReleased(java.awt.event.MouseEvent event)

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);