    CarRaceGUI(CarRaceImpl i,String carClass) {
        super("CarRace");
        PropertiesControl pc = new PropertiesControl("UTF-8");
        messages = ResourceBundle.getBundle("Messages",pc);
        System.out.println("i18n: test="+i18n("test"));
        impl = i;
        ide = new SimpleIDE(this);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setLayout(new BorderLayout());
        VBox baseBox = new VBox();
        this.add(baseBox,BorderLayout.CENTER);
        HBox controlBox = new HBox();
        baseBox.myAdd(controlBox,0);
        HBox classNameBox = new HBox();
        classNameBox.setBorder(new TitledBorder(i18n("main.carClassname")));
        controlBox.myAdd(classNameBox,1);
        carClassTF = new JTextField(carClass,20);
        classNameBox.myAdd(carClassTF,1);
        HBox loadFromBox = new HBox();
        loadFromBox.setBorder(new TitledBorder(i18n("main.loadFrom")));
        controlBox.myAdd(loadFromBox,0);
        loadFromL = new JLabel("loadFrom???");
        loadFromBox.myAdd(loadFromL,0);
        changeCPB = new JButton(i18n("main.change"));
        changeCPB.addActionListener(this);
        loadFromBox.myAdd(changeCPB,0);
        VBox controlBox1 = new VBox();
        controlBox.myAdd(controlBox1,0);
        confB = new JButton(i18n("main.settings"));
        confB.addActionListener(this);
        controlBox1.myAdd(confB,0);
        ideB = new JButton(i18n("main.programming"));
        ideB.addActionListener(this);
        controlBox1.myAdd(ideB,0);
        VBox controlBox2 = new VBox();
        controlBox.myAdd(controlBox2,0);
        HBox generalInfoBox = new HBox();
        controlBox2.myAdd(generalInfoBox,0);
        fastForwardCB = new JCheckBox(i18n("main.fastForward"));
        fastForwardCB.addActionListener(this);
        generalInfoBox.myAdd(fastForwardCB,0);
        generalInfoL = new JLabel(i18n("main.time"));
        generalInfoBox.myAdd(generalInfoL,1);
        HBox mainButtonsBox = new HBox();
        controlBox2.myAdd(mainButtonsBox,0);
        startB = new JButton(i18n("main.start"));
        startB.addActionListener(this);
        mainButtonsBox.myAdd(startB,1);
        pauseB = new JButton(i18n("main.pause"));
        pauseB.addActionListener(this);
        mainButtonsBox.myAdd(pauseB,1);
        stopB = new JButton(i18n("main.stop"));
        stopB.addActionListener(this);
        mainButtonsBox.myAdd(stopB,1);
        HBox displayBox = new HBox();
        baseBox.myAdd(displayBox,1);
        mainCanvas = A3Canvas.createA3Canvas(400,400);
        mainCanvas.setCameraLocImmediately(0.0,150.0,0.0);
        mainCanvas.setCameraLookAtPointImmediately(-50.0,0.0,1.0);
        a3csController = new A3CSController(150.0);
        mainCanvas.setA3Controller(a3csController);
        displayBox.myAdd(mainCanvas,1);
        VBox subBox = new VBox();
        displayBox.myAdd(subBox,1);
        HBox carBox = new HBox();
        subBox.myAdd(carBox,1);
        carCanvas = A3SubCanvas.createA3SubCanvas(200,200);
        carBox.myAdd(carCanvas,1);
        stdOutTA = new JTextArea(10,40);
        stdOutTA.setEditable(false);
        JScrollPane sp = new JScrollPane(stdOutTA);
        sp.setMinimumSize(new Dimension(100,100));
        baseBox.myAdd(sp,0);
        out = new JTextAreaOutputStream(stdOutTA,System.out);
        PrintStream ps = new PrintStream(out,true);
        System.setOut(ps);
        System.setErr(ps);
        updateLoadFrom();
    }

    CarRaceGUI(CarRaceImpl i,String carClass) {
        super("CarRace");
        PropertiesControl pc = new PropertiesControl("UTF-8");
        messages = ResourceBundle.getBundle("Messages",pc);
        System.out.println("i18n: test="+i18n("test"));
        impl = i;
        ide = new SimpleIDE(this);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setLayout(new BorderLayout());
        VBox baseBox = new VBox();
        this.add(baseBox,BorderLayout.CENTER);
        HBox controlBox = new HBox();
        baseBox.myAdd(controlBox,0);
        HBox classNameBox = new HBox();
        classNameBox.setBorder(new TitledBorder(i18n("main.carClassname")));
        controlBox.myAdd(classNameBox,1);
        carClassTF = new JTextField(carClass,20);
        classNameBox.myAdd(carClassTF,1);
        HBox loadFromBox = new HBox();
        loadFromBox.setBorder(new TitledBorder(i18n("main.loadFrom")));
        controlBox.myAdd(loadFromBox,0);
        loadFromL = new JLabel("loadFrom???");
        loadFromBox.myAdd(loadFromL,0);
        changeCPB = new JButton(i18n("main.change"));
        changeCPB.addActionListener(this);
        loadFromBox.myAdd(changeCPB,0);
        VBox controlBox1 = new VBox();
        controlBox.myAdd(controlBox1,0);
        confB = new JButton(i18n("main.settings"));
        confB.addActionListener(this);
        controlBox1.myAdd(confB,0);
        ideB = new JButton(i18n("main.programming"));
        ideB.addActionListener(this);
        controlBox1.myAdd(ideB,0);
        VBox controlBox2 = new VBox();
        controlBox.myAdd(controlBox2,0);
        HBox generalInfoBox = new HBox();
        controlBox2.myAdd(generalInfoBox,0);
        fastForwardCB = new JCheckBox(i18n("main.fastForward"));
        fastForwardCB.addActionListener(this);
        generalInfoBox.myAdd(fastForwardCB,0);
        generalInfoL = new JLabel(i18n("main.time"));
        generalInfoBox.myAdd(generalInfoL,1);
        HBox mainButtonsBox = new HBox();
        controlBox2.myAdd(mainButtonsBox,0);
        startB = new JButton(i18n("main.start"));
        startB.addActionListener(this);
        mainButtonsBox.myAdd(startB,1);
        pauseB = new JButton(i18n("main.pause"));
        pauseB.addActionListener(this);
        mainButtonsBox.myAdd(pauseB,1);
        stopB = new JButton(i18n("main.stop"));
        stopB.addActionListener(this);
        mainButtonsBox.myAdd(stopB,1);
        JSplitPane displayAndStdOutSP = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        baseBox.myAdd(displayAndStdOutSP,1);
        JSplitPane displaySP = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
        displayAndStdOutSP.setTopComponent(displaySP);
        mainCanvas = A3Canvas.createA3Canvas(400,400);
        mainCanvas.setPreferredSize(new Dimension(400,400));
        mainCanvas.setMinimumSize(new Dimension(40,40));
        mainCanvas.setCameraLocImmediately(0.0,150.0,0.0);
        mainCanvas.setCameraLookAtPointImmediately(-50.0,0.0,1.0);
        a3csController = new A3CSController(150.0);
        mainCanvas.setA3Controller(a3csController);
        displaySP.setLeftComponent(mainCanvas);
        VBox subBox = new VBox();
        displaySP.setRightComponent(subBox);
        HBox carBox = new HBox();
        subBox.myAdd(carBox,1);
        carCanvas = A3SubCanvas.createA3SubCanvas(200,200);
        carCanvas.setPreferredSize(new Dimension(200,200));
        carCanvas.setMinimumSize(new Dimension(20,20));
        carBox.myAdd(carCanvas,1);
        stdOutTA = new JTextArea(10,40);
        stdOutTA.setEditable(false);
        JScrollPane sp = new JScrollPane(stdOutTA);
        sp.setPreferredSize(new Dimension(100,100));
        sp.setMinimumSize(new Dimension(10,10));
        displayAndStdOutSP.setBottomComponent(sp);
        out = new JTextAreaOutputStream(stdOutTA,System.out);
        PrintStream ps = new PrintStream(out,true);
        System.setOut(ps);
        System.setErr(ps);
        updateLoadFrom();
    }
