- /**
- * Write a description of class FaceDragger here.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- import objectdraw.*;
- import java.awt.*;
- public class DrawExample extends WindowController
- {
- private Location prevPoint;
- private FreehandLine myLine;
- public void begin() {
- }
- public void onMousePress(Location pt) {
- prevPoint = pt;
- myLine = new FreehandLine();
- }
- public void onMouseDrag(Location pt) {
- prevPoint = pt;
- }
- public void onMouseExit(Location pt) {
- myLine.hide();
- }
- }
Raw Paste