I have a final project of a Java course, it is Frog jump game. Here is the video to describe it :
https://www.youtube.com/watch?v=NxWWP9cK24o
I don\'t know how
, i only know Thread.sleep
Well that won't work because the code is executing on the Event Dispatch Thread (EDT)
which is the Thread that repaints the GUI. So if you keep telling it to sleep in never gets a chance to repaint itself.
So if you want to use Thread.sleep, you need to start a separate Thread.
Read the section from the Swing tutorial on Concurrency for more information. Maybe you could also use a SwingWorker as discussed in the tutorial for the worker Thread.