Java clock for JFrame without Timer? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Java clock for JFrame without Timer?

Is it posible to create a clock for a JFrame that works without a timer (for refresh)? Or something what auto-refresh the method? I am new to Java. Thanks for every answer. :)

6th Aug 2018, 4:58 PM
Stayex
Stayex - avatar
1 Answer
0
just google game loop there are many ways to implement it. I think its not that easy to understand though. basically you can use for example java.lang.System.currentTimemillis to measure time and then use it with a while loop.
7th Aug 2018, 9:20 PM
lechickenburGER
lechickenburGER - avatar