Re: call a method at intervals



rickbear wrote:
Hi!

I made an applet in one class.
Now I would like to call two of the methods in a certain timeinterval.
Something like javascript's setInterval("method()", milliseconds);

The one method has to run every minute and the other on every fifth
minute.
Is that possible without making more classes? and how?

- rick -

THere are various ways to do this:
One is using the swing Timer Class. Another way is to create a new thread and point it to a class that implements the Runnable interface.
There are howtos on both of these techniques on the sun website tutorials section.
http://java.sun.com/docs/books/tutorial/essential/threads/
http://java.sun.com/products/jfc/tsc/articles/timer/

Andy
.