skaterdav85 Posted April 17, 2010 Share Posted April 17, 2010 Does Java have a setTimeout method like in JavaScript? I want to create a timer in an applet Im making but I couldn't find any timing methods like that. Link to comment Share on other sites More sharing options...
Synook Posted April 17, 2010 Share Posted April 17, 2010 You can fork a thread (an instance of a class that implements Runnable) and then call sleep() on it (before making it call your method, which you can pass to it by reference).http://java.sun.com/docs/books/tutorial/es...al/concurrency/ Link to comment Share on other sites More sharing options...
skaterdav85 Posted April 18, 2010 Author Share Posted April 18, 2010 I found this swing timer and it worked well. I'm a java newb and didnt want to mess with threads haha Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.