|
Using threads as a countdowntimer
After my classes on java I wanted to explore more about the functions of threads.
Eversince after the last days of my classes, they introduce to us the use of threads and create a program that gets the desktop date and time and displays it on a simple frame.
The question is this, can I utilize threads as runnable only when you press the button? And also, I tried looking for a way on displaying a countdown timer. Is there a variable that acts hours,mins,sec accordingly?
I tried to make a for loop in its place just like in assembly only to realized that it has a delay function that countdown in micro sec.
|