title: windowbuilder textfield not working with combobox
body: <p>I have a problem where I have a comboBox that causes an action that sets the text in a textField.  Here's the code: </p>
  
  <pre><code>public class Main extends JFrame implements ActionListener{
     private JPanel contentPane;
     private JTextField textField;
     private JComboBox comboBox;
  
     //public static void main - nothing much in it except Main frame = new Main();
  
     public Main() {
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      setBounds(100, 100, 563, 407);
      contentPane = new JPanel();
      contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
      setContentPane(contentPane);
      contentPane.setLayout(null);
      comboBox.addActionListener(frame);
      textField = new JTextField();
      textField.setBounds(42, 99, 445, 235);
      textField.setText("HERE");
      contentPane.add(textField);
      textField.setColumns(10);
      comboBox = new JComboBox();
      comboBox.setModel(new DefaultComboBoxModel(new String[] {"Bob", "Dan ", "Emily"}));
      comboBox.setBounds(42, 48, 140, 29);
      contentPane.add(comboBox);
  
      /*ONE WAY OF DOING IT: comboBox.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
          textField.setText(studentOutputString((String)comboBox.getSelectedItem()));
          textField.setText("BLAH");
      }
  });*/
  }
      public String studentOutputString(String student){
          String s = student + "is printed.";
          return s;
  }
  
      public void actionPerformed(ActionEvent e) {
          comboBox = (JComboBox) e.getSource();
          String selectedStudent = (String) comboBox.getSelectedItem();
          textField.setText(studentOutputString(selectedStudent));
  }
  </code></pre>
  
  <p>Nothing shows up in the textField.  Any idea about what I'm doing wrong?</p>
  
  <p>I reformatted it and caught up on my past threads.</p>