1 import javax.swing.JFrame;
2
3 /**
4 This program moves the rectangle.
5 */
6 public class RectangleViewer
7 {
8 public static void main(String[] args)
9 {
10 JFrame frame = new RectangleFrame();
11 frame.setTitle("An animated rectangle");
12 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
13 frame.setVisible(true);
14 }
15 }