The code demonstrates how to use threads in applets. This example creates 9 Canvases (threads) each having a ball moving inside the canvas boundaries. The speed, size and color of balls can be customized in the code
If your browser supports Java Applets, Click Here to view online demo