0

I am currently working on a project that moves a circle from a space to space when button is pressed. I designed as following: When the button is pressed, it increments the coordinates of circle, in a for loop from 0 to 10.

The problem is, the motion I wanted with for loop doesn't show up on the screen but it only shows the object on the first and the last coordinates, so it doesn't move one by one.

Any suggestion would be appreciated,

Kutay Demireren

Kutay Demireren
  • 640
  • 1
  • 10
  • 25

1 Answers1

1

You need to set a frame draw length that the human eye can see in order for motion to work properly. The can be achieved in many ways, but the easiest is with a thread.sleep at the end of each for loop iteration for however long you want the different pictures to be visible for.

Bmoore
  • 315
  • 4
  • 16