APL/APL2.1/TP07/Sautoir/Sautoir.java
2022-03-08 17:15:30 +01:00

20 lines
546 B
Java

import javax.swing.*;
import java.awt.*;
public class Sautoir {
public static void main(String[] args) {
JFrame f = new JFrame("Sautoir");
f.setSize(500, 500);
f.setLocation(100, 100);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setLayout(new GridLayout(6, 5));
for (int i = 0; i < 30; i++) {
Sablier s = new Sablier();
s.setLocation(20 + (i%5) * 40, i/5 * 40);
s.setSize(40, 40);
f.add(s);
}
f.setVisible(true);
}
}