FileDocCategorySizeDatePackage
Scribble.javaAPI DocExample857Fri Feb 16 13:29:28 GMT 1996None

Scribble

public class Scribble extends Applet

Fields Summary
private int
last_x
private int
last_y
Constructors Summary
Methods Summary
public booleanmouseDown(java.awt.Event e, int x, int y)

    
    // called when the user clicks
           
    
        last_x = x; last_y = y;
        return true;
    
public booleanmouseDrag(java.awt.Event e, int x, int y)

        Graphics g = getGraphics();
        g.drawLine(last_x, last_y, x, y);
        last_x = x;
        last_y = y;
        return true;