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: Container contentPane = frame.getContentPane();
17: contentPane.add(new CarPanel());
18: frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);
19: frame.show();
20: }
21:
22: private static final int FRAME_WIDTH = 400;
23: private static final int FRAME_HEIGHT = 400;
24: }
25:
26: