Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

call a method at intervals

Thread view: 
rickbear - 29 Apr 2006 16:33 GMT
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 -
Mike Schilling - 29 Apr 2006 17:45 GMT
> Hi!
>
[quoted text clipped - 5 lines]
> minute.
> Is that possible without making more classes? and how?

Look into java.util.Timer
Trung Chinh Nguyen - 29 Apr 2006 17:48 GMT
If you are using Swing Applet you can use its Timer class
Have a look at
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/Timer.html for details

> Hi!
>
[quoted text clipped - 7 lines]
>
> - rick -


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.