[java] timer in java
this is a pretty simple question and i think ive gotten tangled up in vapour here....
but htf do u set up a timer in java and use the values that the timer takes?
dont have the documentation, its gonna take me a couple of nights to dl on my limited b/w...
thnks anyhoot....
here in castle camelot we eat ham and jam and spam alot!
import javax.swing.Timer
then have something like
Timer timerVariable = new Timer(int (the timedelay in MILLISECONDS), an action listener)
if you had a class or something that you wanted to have a timer in just have the class implement actionlistener and for the actionlistener part of the constructor put THIS
then have something like
Timer timerVariable = new Timer(int (the timedelay in MILLISECONDS), an action listener)
if you had a class or something that you wanted to have a timer in just have the class implement actionlistener and for the actionlistener part of the constructor put THIS
i forgot to say that you have to also have a method that picks up everytime the timer goes off because it is an event.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement