01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package horstmann.ch06_car;
import javax.swing.JFrame;

/**
   A program that allows users to move a car with the mouse.
 */
public class CarMover
{
  public static void main(String[] args)
  {
    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    frame.add(new CarComponent());
    frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);
    frame.setVisible(true);
  }

  private static final int FRAME_WIDTH = 400;
  private static final int FRAME_HEIGHT = 400;
}