/** @author j.n.magee 14/08/98 */ package concurrency.announce; import java.awt.event.*; class BoxMover extends Thread { private BoxCanvas display; private int id, delay, MaxX, MaxY, x, y; private boolean hit=false; private MyListener listener = new MyListener(); BoxMover(BoxCanvas d, int id, int delay) { display = d; display.addMouseListener(listener); // register action this.id = id; this.delay=delay; MaxX = d.getSize().width; MaxY = d.getSize().height; } synchronized void isHit(int mx, int my) { //should be private but netscape 4.06 hit = (mx>x && mxy && my