Lignes aléatoires
Fichier Lignes.java
import javax.swing.JApplet; import java.awt.Graphics; public class Lignes extends JApplet { public void paint(Graphics g) { for(int i=0; i<100; ++i) { int x0 = (int)(Math.random()*100); int y0 = (int)(Math.random()*100); int x1 = (int)(Math.random()*100); int y1 = (int)(Math.random()*100); g.drawLine(x0, y0, x1, y1); } } }