java - What is the best way to call repaint() at regular intervals in my Java2D program? -


I want to call my Java 2D simulator at regular intervals.

What is the best way to do this? Should I start another thread and have a loop that keeps track of currentTimeMillis ()? Or is there a better way?

Use the timer function in Java ()

and it's useful for you Maybe


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

kernel - How to create a "Block device" in Windows -