title: How can I display the text in the text field in the text area when I clicked the button?
body: <p>This is what I have tried so far:</p>
  
  <pre><code>{
      TextField tf;
      JTextArea ta; 
  
      public TextListener()
      {
          gui();
      }
  
      public void gui()
      {
          JFrame f = new JFrame();
          JPanel p = new JPanel();
          tf = new JTextField("",20);
          ta = new JTextArea("",20,20);
          JButton b = new JButton("SHOW"); 
  
          f.add(p);
          p.add(tf);
          p.add(b);
          p.add(ta);
  
          f.setVisible(true);
          f.setSize(400,200);
          f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
      }
  
      public void actionPerformed(ActionEvent ae)
      {
          String name = tf.getText();
          ta.append(name);
      }
  
      public static void main(String[] arg)
      {
          new TextListner();
  
      }
  </code></pre>