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 -

c# - How can I find out if there are windows above a control? -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -