Java program to demonstrate multithreading using moving balls example in a frame