01: import java.awt.*;
02: import java.awt.geom.*;
03: import java.awt.event.*;
04: import javax.swing.*;
05: 
06: /**
07:    A program that allows users to move a car with the mouse.
08: */
09: public class CarMover
10: {
11:    public static void main(String[] args)
12:    {
13:       JFrame frame = new JFrame();
14:       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
15: 
16:       frame.add(new CarComponent());
17:       frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);
18:       frame.setVisible(true);
19:    }
20: 
21:    private static final int FRAME_WIDTH = 400;
22:    private static final int FRAME_HEIGHT = 400;
23: }
24: 
25: