import java.awt.*;
import java.applet.*;

public class SampleScribble1 extends Applet {

    int x1;
    int y1;

    public boolean mouseDown(
        Event e,
        int   x,
        int   y
    ) {
        // User has started a mouse drag.
        // Remember where:
	x1 = x;
	y1 = y;

	return true;
    }

    public boolean mouseDrag(
        Event e,
        int   x,
        int   y
    ) {
        // User is continuing a mouse drag.
        // Draw line from last point to this
        // point:
	Graphics g = getGraphics();
	g.drawLine( x1,y1, x,y );

	// Remember new "last point":
	x1 = x;
	y1 = y;

	return true;
    }
}


