title: How to add text to a TextArea in java
body: <p>I have this code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>package com.butoane;
  
  import javax.swing.*;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  
  public class App {
      private JButton apasaAiciButton;
      private JPanel Dunno;
      private JButton apoiaici;
      private JTextArea text1;
  
      public App() {
         String a = "H";
         String b = "e";
          apasaAiciButton.addActionListener(new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                  apoiaici.setEnabled(true);
                  apasaAiciButton.setEnabled(false);
                  text1.setText(toString(a));
              }
  
          });
          apoiaici.addActionListener(new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                  apoiaici.setEnabled(false);
                  apasaAiciButton.setEnabled(true);
                  apasaAiciButton.setText("Apasa iar aici");
                  text1.setText(toString(b));
              }
          });
      }
      public static void main(String[] args) {
          JFrame frame = new JFrame("App");
          frame.setContentPane(new App().Dunno);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.pack();
          frame.setVisible(true);
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>What I want to do is, when one button is pressed, the text field gets either H or E, like : Button1(apasaAici) gets pressed, the text gets H
  Button2(apoiAici) gets pressed, the text area gets an E after the "H", and, doing this over and over, the textarea to get every time an <code>HeHeHeHe</code>, you get it ?</p>
  
  <p>How can I make this possible ?</p>