Platform-independent animation delay
1 posts in topic
Flat View  Flat View

Posted By:   John_Kelley
Posted On:   Tuesday, April 17, 2001 11:34 AM

How do you compute an animation delay
at runtime? I'm creating a bunch of BufferedImages in memory and need to display them as quickly as possible on a JComponent. I need to run this animation program on several different platforms with varying display performance ability. A hard coded delay fails with these requirements.


Re: Platform-independent animation delay

Posted By:   Sandip_Chitale  
Posted On:   Tuesday, April 17, 2001 10:39 PM

You use the sleep method of java.lang.Thread -

public static void sleep(long millis,
int nanos)

which specifies delay in absolute elapsed time.
About | Sitemap | Contact