title: Java JButton Unresponsive
body: <p>I've got a simple program that should accept input from a text field or a button.</p>
  
  <p>However, the button is totally unresponsive.  Am I missing something obvious?</p>
  
  <pre><code>public class BoxDiagram extends GraphicsProgram {
  
  private static final int MAX_CHARS = 25;
  
  public void init() {
      addActionListeners();
      nameField = new JTextField(MAX_CHARS);
      nameField.addActionListener(this);
      addButton = new JButton("Add");
      add(nameField, SOUTH);
      add(addButton, SOUTH);
  }
  
  public void actionPerformed(ActionEvent e) {
      Object source = e.getSource();
      if (source == addButton || source == nameField) {
          add(new GLabel("hello", getWidth() / 2, getHeight() / 2));
      }
  }
  
  private JTextField nameField;
  private JButton addButton;
  
  }
  </code></pre>