3 public class Exemple3 {
5 static final Random random = new Random();
7 public static void main(String[] args) {
8 DrawingWindow w = new DrawingWindow("Exemple 3", 640, 480);
10 for (int i = 0; ; i++) {
12 int x1 = random.nextInt(w.width);
13 int y1 = random.nextInt(w.height);
14 int x2 = random.nextInt(w.width);
15 int y2 = random.nextInt(w.height);
16 w.setColor(random.nextFloat(),
19 w.drawLine(x1, y1, x2, y2);