Because today’s computers are very fast, you will probably not notice any discernible difference on the screen between the code
One way to see the disappearance and reappearance of the window is to put a delay between the successive setVisible messages. Here’s the magic code that puts a delay of 0.5 s:
The argument we pass to the sleep method specifies the amount of delay in milliseconds [note: 1000 milliseconds (ms) _ 1 second (s)]. We will not explain this magic code.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.