develop an animation of the ball dropping from top to bottom in java by using thread 5187895
Develop an animation of the ball dropping from top to bottom in java by using (threads). Your frame should look similar to this image:
When the button is clicked, the ball (circle) is dropped from top to bottom (redrawn at 10 pixels lower with pause of 100 ms) until it reaches the ground (line shown). Then the ball bounces from the ground at a height lower than the previous one by 20 pixels. The thread that draws the ball continues until the next height become at the ground (y coordinate of the line – the circle size). The time shown (a JLabel) is run by another thread that increases the time in seconds until the ball does not bounce any more.
Time 0 Drop Ball