How to Create an TimerEvent in Java | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to Create an TimerEvent in Java

Advanced ThankYou For Answers :)

22nd Feb 2020, 9:42 PM
Booztay
Booztay - avatar
2 Answers
+ 4
Adding up to Pedro H.J reply, just in case you don't want to use Swing... Pro: Runs in a dedicated background thread, the swing timer runs in the gui thread, you need to switch context to not block your gui ;) https://www.baeldung.com/java-timer-and-timertask
24th Feb 2020, 10:13 PM
Tashi N
Tashi N - avatar