APL/Fun/TestGraphique/Fun.java
2022-10-20 12:49:09 +02:00

33 lines
723 B
Java

import java.awt.BorderLayout;
import javax.swing.JFrame;
/**
* Fun
*/
public class Fun {
private static long time;
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocation(100, 100);
frame.setSize(700, 700);
FunPanel p = new FunPanel();
frame.add(p, BorderLayout.CENTER);
frame.setVisible(true);
time = System.nanoTime();
while (true) {
if (System.nanoTime() - time > 16666666L / 10L) {
FunPanel.table += 0.0001d;
p.repaint();
time = System.nanoTime();
}
}
}
}