Write a Java program so that when the program is executed, a window will appear with white background. The window should be of size 400x400 pixels. Then when the user clicks at the window, a circle of size 20 pixels will be created. The circle will move linearly in a random direction with a speed of 5 pixels per second. When the circle collides with anything, say another circle or the border of the window, the circle will disappear. Note that if the user clicks at a point so that the newly created circle immediately collides with anything, then it will immediately disappear and cause all other circles to disappear if they collide with the newly created one
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.