APL/Fun/TestGraphique/Fun.java

33 lines
723 B
Java
Raw Permalink Normal View History

2022-10-06 14:58:27 +02:00
import java.awt.BorderLayout;
import javax.swing.JFrame;
/**
* Fun
*/
public class Fun {
2022-10-20 12:49:09 +02:00
private static long time;
2022-10-06 14:58:27 +02:00
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocation(100, 100);
frame.setSize(700, 700);
2022-10-14 17:25:23 +02:00
FunPanel p = new FunPanel();
frame.add(p, BorderLayout.CENTER);
2022-10-06 14:58:27 +02:00
frame.setVisible(true);
2022-10-14 17:25:23 +02:00
2022-10-20 12:49:09 +02:00
time = System.nanoTime();
2022-10-14 17:25:23 +02:00
while (true) {
2022-10-20 12:49:09 +02:00
if (System.nanoTime() - time > 16666666L / 10L) {
FunPanel.table += 0.0001d;
p.repaint();
2022-10-14 17:25:23 +02:00
2022-10-20 12:49:09 +02:00
time = System.nanoTime();
2022-10-14 17:25:23 +02:00
}
}
2022-10-06 14:58:27 +02:00
}
}