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

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

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