* tests/regression/Makefile.am: Always use the same bootclasspath for
[cacao.git] / tests / scribble.java
1 import java.applet.*;
2 import java.awt.*;
3
4 public class scribble extends Applet {
5    private int last_x=0;
6    private int last_y=0;
7
8
9     public void init()
10     {
11        this.setBackground(Color.white);
12     }
13
14
15     public boolean mouseDown(Event e, int x, int y)
16     {
17        last_x = x; last_y=y; 
18        return true;
19     }
20
21     public boolean mouseDrag(Event e, int x, int y)
22     {
23        Graphics g = getGraphics();
24        g.setColor (Color.black);
25        g.drawLine(last_x,last_y,x,y);
26        last_x=x; last_y=y;
27        return true;
28     }
29 }