title: How do I add a list of user inputs into a textfield
body: <p>Basically assume I have two text fields on my java applet:
  [__________]  [___________]</p>
  
  <p>The first text field takes in user input and the second textbox prints that user input to store it as a list. So if the user inputted "cat" then "dog", then "frog", the second textfield should look like this:
  [cat, dog, frog]. When the user types a word and clicks button 1 it should add the word into the second textfield. The code below is what I tried but nothing is happening:</p>
  
  <pre><code>textf = user input field
  texty = output field
  
  public void actionPerformed(ActionEvent e){
      if (e.getSource() == b1 ){
          x = textf.getText();
          texty.add(x);
          textf.setText(null);
      }
  </code></pre>