/*
What happens when this applet runs: 1. When user clicks in window, mouseClicked() is called. 2. This starts thread1. 3. Within thread1, run() is called. 4. Within thread1, run() performs one step and calls myPause(). 5. Within thread1, myPause() triggers repaint(). - It calls notify(), which relinquishes the thread ...? - and then wait()'s... ? 6. Now thread1 is waiting. However, the system is still running, - and because repaint() was called, paint() gets called, - and image1 gets displayed. 7. User clicks again. This calls myResume(). 8. myResume() calls notify(). This relinquishes control of thread1....? - to myPause() ...? which now finishes its wait ...? and returns, - so that run() can proceed to the next iteration. 9. Go back to step 4. 10. After 10 steps, the loop in run() terminates. Now nothing happens. Alternative to step 7:milliseconds elapse; myPause() stops waiting, and returns, so run() proceeds to next iteration.