Hello, i just started to game programing with java, before that i was using c# Xna.I wrote my engine,and it is working fine.But i didn't use a canvas.You can see my game engine below.I'm wondering should i use canvas to draw (if so why?) or not?

And i saw nobody preferred using timers to a while loop and my fps should be fixed 60 but it is more than 60 so am i doing something wrong ?

You're leaking time! What about the time the GameLoop() call takes? This means the time you measure is longer (potentially much longer) than the real life time, causing your frame rate calculation to be wrong.

If you only call System.currentTimeMillis() once per call, you won't leak any time:

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org