An Exercise For You. The Random Draw Thread

Task: Write an applet that when you press the "start" button draws, and keeps drawing random coloured and sized filled ovals, as can be seen in Figure 11.10, “A Random Draw Thread Exercise Screen Capture.” until the "stop" button is pressed. The applet should only display one oval at a time at each loop of the thead. You can see my version here - RandomDrawThread.html

Figure 11.10. A Random Draw Thread Exercise Screen Capture.

A Random Draw Thread Exercise Screen Capture.

Hint: You can use the code from the section called “A Functional Canvas Example” to get you started.