When I run the code below with the "thread.sleep", the ball runs from left corner to right corner, leaving a trail behind it as expected.

but when I remove the thread.sleep part, the balls appears...