// ClickableCanvas is simply a Canvas that handles mouse clicks.
// This definition is necessary in order to get the x,y coordinates of a click
// relative to the canvas rather than to the entire applet

import java.awt.*;

public class ClickableCanvas extends Canvas {

    public boolean handleEvent(Event e) {
        if( e.id == e.MOUSE_UP ) {
            e.target = this;
            getParent().getParent().handleEvent(e);
            return true;
        }
        else { return false; }
    }

} // ends class

