A window opens containing a circle with radius initially 5 pixels and with the x-coordinate of its centre randomly chosen in the range 50 to 342 pixels and the y-coordinate of its centre randomly chosen in the range 50 to 218 pixels. The colour of the circle is randomly chosen from the colours red, blue, green, magenta and yellow. The circle immediately.
I have completed all of this part but i am having trouble with the following part. I am not sure if you should use a while loop for the whole thing?
It starts to grow at the rate of 1 pixel every 20 milliseconds until the edge of the circle first touches one of the four borders of the display area. At this point the circle stops expanding and stays unchanged for 500 milliseconds, then the whole process is repeated.