orders.setCellRenderer(trainOrderJPanel1);
    private void initComponents() {//GEN-BEGIN:initComponents        java.awt.GridBagConstraints gridBagConstraints;        editOrderJPopupMenu = new javax.swing.JPopupMenu();        gotoStationJMenuItem = new javax.swing.JMenuItem();        changeStation = new javax.swing.JMenuItem();        removeStationJMenuItem = new javax.swing.JMenuItem();        jSeparator1 = new javax.swing.JSeparator();        addWagonJMenu = new javax.swing.JMenu();        removeWagonsJMenu = new javax.swing.JMenu();        removeLastJMenuItem = new javax.swing.JMenuItem();        removeAllJMenuItem = new javax.swing.JMenuItem();        changeConsistJMenu = new javax.swing.JMenu();        noChangeJMenuItem = new javax.swing.JMenuItem();        engineOnlyJMenuItem = new javax.swing.JMenuItem();        waitJMenu = new javax.swing.JMenu();        dontWaitJMenuItem = new javax.swing.JMenuItem();        waitUntilFullJMenuItem = new javax.swing.JMenuItem();        jSeparator2 = new javax.swing.JSeparator();        pullUpJMenuItem = new javax.swing.JMenuItem();        pushDownJMenuItem = new javax.swing.JMenuItem();        addStationJButton = new javax.swing.JButton();        priorityOrdersJButton = new javax.swing.JButton();        trainOrderJPanel1 = new jfreerails.client.view.TrainOrderJPanel();        jScrollPane1 = new javax.swing.JScrollPane();        orders = new javax.swing.JList();        orders.addMouseListener(ordersPopupAdapter);        gotoStationJMenuItem.setText("Goto station");        gotoStationJMenuItem.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                gotoStationJMenuItemActionPerformed(evt);            }        });        editOrderJPopupMenu.add(gotoStationJMenuItem);        changeStation.setText("Change Station");        changeStation.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                changeStationActionPerformed(evt);            }        });        editOrderJPopupMenu.add(changeStation);        removeStationJMenuItem.setText("Remove station");        removeStationJMenuItem.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                removeStationJMenuItemActionPerformed(evt);            }        });        editOrderJPopupMenu.add(removeStationJMenuItem);        editOrderJPopupMenu.add(jSeparator1);        addWagonJMenu.setText("Add Wagon");        editOrderJPopupMenu.add(addWagonJMenu);        removeWagonsJMenu.setText("Remove wagon(s)");        removeLastJMenuItem.setText("Remove last");        removeLastJMenuItem.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                removeLastJMenuItemActionPerformed(evt);            }        });        removeWagonsJMenu.add(removeLastJMenuItem);        removeAllJMenuItem.setText("Remove all wagons");        removeAllJMenuItem.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                removeAllJMenuItemActionPerformed(evt);            }        });        removeWagonsJMenu.add(removeAllJMenuItem);        editOrderJPopupMenu.add(removeWagonsJMenu);        changeConsistJMenu.setText("Change consist to..");        noChangeJMenuItem.setText("'No change'");        noChangeJMenuItem.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                noChangeJMenuItemActionPerformed(evt);            }        });        changeConsistJMenu.add(noChangeJMenuItem);        engineOnlyJMenuItem.setText("Engine only");        engineOnlyJMenuItem.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                engineOnlyJMenuItemActionPerformed(evt);            }        });        changeConsistJMenu.add(engineOnlyJMenuItem);        editOrderJPopupMenu.add(changeConsistJMenu);        waitJMenu.setText("Wait at station");        dontWaitJMenuItem.setText("Don't wait");        dontWaitJMenuItem.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                dontWaitJMenuItemActionPerformed(evt);            }        });        waitJMenu.add(dontWaitJMenuItem);        waitUntilFullJMenuItem.setText("Wait until full");        waitUntilFullJMenuItem.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                waitUntilFullJMenuItemActionPerformed(evt);            }        });        waitJMenu.add(waitUntilFullJMenuItem);        editOrderJPopupMenu.add(waitJMenu);        editOrderJPopupMenu.add(jSeparator2);        pullUpJMenuItem.setText("Pull up");        pullUpJMenuItem.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                pullUpJMenuItemActionPerformed(evt);            }        });        editOrderJPopupMenu.add(pullUpJMenuItem);        pushDownJMenuItem.setText("Push down");        pushDownJMenuItem.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                pushDownJMenuItemActionPerformed(evt);            }        });        editOrderJPopupMenu.add(pushDownJMenuItem);        addStationJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jfreerails/client/graphics/toolbar/add_station.png")));        addStationJButton.setToolTipText("Add Station");        addStationJButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                addStationJButtonActionPerformed(evt);            }        });        priorityOrdersJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jfreerails/client/graphics/toolbar/priority_orders.png")));        priorityOrdersJButton.setToolTipText("Add Priority Orders");        priorityOrdersJButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                priorityOrdersJButtonActionPerformed(evt);            }        });        setLayout(new java.awt.GridBagLayout());        setBorder(new javax.swing.border.TitledBorder("Schedule"));        orders.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);        orders.setCellRenderer(trainOrderJPanel1);        jScrollPane1.setViewportView(orders);        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 0;        gridBagConstraints.gridy = 0;        gridBagConstraints.gridwidth = 2;        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;        gridBagConstraints.weightx = 1.0;        gridBagConstraints.weighty = 1.0;        gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);        add(jScrollPane1, gridBagConstraints);    }//GEN-END:initComponents