01: import javax.swing.JFrame;
02: 
03: public class CarViewer
04: {
05:    public static void main(String[] args)
06:    {
07:       JFrame frame = new JFrame();
08: 
09:       final int FRAME_WIDTH = 300;
10:       final int FRAME_HEIGHT = 400;
11: 
12:       frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);
13:       frame.setTitle("Two cars");
14:       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
15: 
16:       CarComponent component = new CarComponent();
17:       frame.add(component);
18: 
19:       frame.setVisible(true);
20:    }
21: }