// The right way using a separate thread for the animation // Raja Sooriamurthi 11/13/99 import java.awt.*; import java.awt.event.*; import java.applet.*; import java.util.*; public class BouncingBalls extends Applet { final static int NUM_BALLS = 4; Vector bv = new Vector(); Thread dt; boolean RUNNING = true; public void init() { setBackground(new Color (0xff, 0xcc, 0xff)); for (int i=0; i