/*
  Disegna un punto finche' il mouse e' premuto,
  poi lo cancella.
*/

import java.awt.*;

public class DisegnaCancellaDue extends java.applet.Applet {

  int lx,ly;

  public boolean mouseDown(Event e, int x, int y) {
    Graphics g=getGraphics();

    lx=x;
    ly=y;

    g.fillRect(x-3,y-3,7,7);

    return true;
  }

  public boolean mouseUp(Event e, int x, int y) {
    Graphics g=getGraphics();

    g.clearRect(lx-3,ly-3,7,7);

    return true;
  }
}
