Manipulate balls, a box and lights in this Java program