Possible Duplicate:
Java Timer
How can I keep track of the remaining time in a fixed period of time in Java?
For instance, I want to display this output each second to the user:
you have 50 seconds
you have 49 seconds //after 1 second
you have 48 seconds //after 2 seconds
And so on.