
import objectdraw.*;
import java.awt.*;

/*
 * The first cs134 program. 
 * Draws text on the screen when mouse is clicked,
 * and red ovals when the mouse moves.
 * 
 * This illustrates event handling and a few basic
 * graphics primitives.
 */

public class TouchyWindow extends WindowController {

    public void onMouseClick(Location point) {
        new FilledRect(90, 90, 90, 30, canvas).setColor(Color.yellow);
        new FramedRect(90, 90, 90, 30, canvas);
        new Text("I'm touched", 100, 100, canvas);
    }

    public void onMouseMove(Location point) {
        new FilledOval(point, 10, 10, canvas).setColor(Color.red);
    }
    
}
