Multi-threading in Java
Using only one thread, write a Java program called Ring.java that displays a black panel of dimension 200×200 (in pixels). The panel displays a red ring (i.e., a doughnut) that is centered on the center of the panel, has an outer diameter of 100 pixels and an inner diameter of 70 pixels.
Your program must take one positive integer command-line argument, let’s call it P. The panel makes the ring “blink”, i.e., become black for 200 ms, then red for P ms, then black for 200 ms, etc. Use the Thread.sleep() function to wait the required lapses of time. if P is 0, then the ring is never visible.
Your program should also display a “Start” button. The blinking starts only when this button is pressed, at which point the button becomes disabled. It’s ok for your program to run forever.