trainListJButton.setText("Train list"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 2; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); add(trainListJButton, gridBagConstraints);
    private void initComponents() {//GEN-BEGIN:initComponents        java.awt.GridBagConstraints gridBagConstraints;        trainDetailsJPanel1 = new jfreerails.client.view.TrainDetailsJPanel();        newTrainScheduleJPanel1 = new jfreerails.client.view.TrainScheduleJPanel();        jPanel1 = new javax.swing.JPanel();        previousJButton = new javax.swing.JButton();        nextJButton = new javax.swing.JButton();        trainListJButton = new javax.swing.JButton();        setLayout(new java.awt.GridBagLayout());        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridwidth = 4;        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;        gridBagConstraints.weightx = 1.0;        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);        add(trainDetailsJPanel1, gridBagConstraints);        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 0;        gridBagConstraints.gridy = 1;        gridBagConstraints.gridwidth = 4;        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;        gridBagConstraints.weightx = 1.0;        gridBagConstraints.weighty = 1.0;        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);        add(newTrainScheduleJPanel1, gridBagConstraints);        jPanel1.setLayout(new java.awt.GridBagLayout());        previousJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jfreerails/client/graphics/toolbar/previous.png")));        previousJButton.setToolTipText("Previous Train");        previousJButton.setAlignmentX(1.0F);        previousJButton.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);        previousJButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                previousJButtonActionPerformed(evt);            }        });        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 2;        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);        jPanel1.add(previousJButton, gridBagConstraints);        nextJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jfreerails/client/graphics/toolbar/next.png")));        nextJButton.setToolTipText("Next Train");        nextJButton.setAlignmentX(1.0F);        nextJButton.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);        nextJButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                nextJButtonActionPerformed(evt);            }        });        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 3;        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);        jPanel1.add(nextJButton, gridBagConstraints);        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 3;        gridBagConstraints.weightx = 1.0;        add(jPanel1, gridBagConstraints);        trainListJButton.setText("Train list");        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 2;        gridBagConstraints.gridy = 2;        gridBagConstraints.weightx = 1.0;        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);        add(trainListJButton, gridBagConstraints);    }//GEN-END:initComponents