FileDocCategorySizeDatePackage
Annoyance.javaAPI DocExample701Mon Apr 05 11:08:36 BST 1999None

Annoyance

public class Annoyance extends ApplicationFrame implements MouseMotionListener

Fields Summary
private int
mX
private int
mY
Constructors Summary
public Annoyance()

    super("Annoyance v1.0");
    addMouseMotionListener(this);
    setVisible(true);
  
Methods Summary
public static voidmain(java.lang.String[] args)

    new Annoyance();
  
public voidmouseDragged(java.awt.event.MouseEvent me)

 mouseMoved(me); 
public voidmouseMoved(java.awt.event.MouseEvent me)

    mX = (int)me.getPoint().getX();
    mY = (int)me.getPoint().getY();
    repaint();
  
public voidpaint(java.awt.Graphics g)

    int s = 100;
    g.setColor(Color.blue);
    g.fillRect(mX - s / 2, mY - s / 2, s, s);