title: Taking input from textField and displaying it in textArea
body: <p>I have having trouble getting my program to take the user input from textField and displaying it in textArea. The program I'm making is a Stack/Queue program. It has a textField that a user inputs a number into. Then there is a button that takes the input and displays it in the textArea as a Stack(FILO).</p>
  
  <p>Edit 1: 
  I am able to move the user input into the textArea now but, whenever I add a second input it just replaces the old input with the new instead of showing the list. I am supposed to use a toString method to show the whole list? Where do I need to put the toString method if I need it?</p>
  
  <p>TLDR, How do I take input from textField and display it in textArea?</p>
  
  <p>This is my main class.</p>
  
  <pre><code>TextField text = new TextField();
  TextArea textArea = new TextArea("Text Area");
  
  public class StackQueue extends Application
  {
  @Override
  public void start(Stage stage) throws Exception
  {
      Stack myStack = new Stack();
  
      Button btAdd = new Button("Add");       
      Button btDel = new Button("Delete");
      Button btClear = new Button("Clear");
      BorderPane bpane = new BorderPane();
  
      text.setPrefWidth(50);
      text.setAlignment(Pos.CENTER_LEFT);
      text.setText("Label");
      text.clear();
  
      textArea.setPrefColumnCount(1);
      textArea.setPrefRowCount(10);
      textArea.clear();
  
      HBox hBox = new HBox();
      hBox.getChildren().addAll(btAdd, btDel, btClear);
      bpane.setTop(hBox);
      bpane.setCenter(text);
      bpane.setBottom(textArea);
  
      Scene scene = new Scene(bpane, 500, 250);
      stage.setTitle("Stack Example");
      stage.setScene(scene);
      stage.show();
  
  
      EventHandler&lt;ActionEvent&gt; addEvent = event -&gt; add();
      EventHandler&lt;ActionEvent&gt; delEvent = event -&gt; del();
  
      btAdd.setOnAction(addEvent);
      btDel.setOnAction(delEvent);
  
  
  
  
  public void add()
  {
      textArea.setText(text.getText(x));
  }
  
  public void del()
  {
  
  }
  
  }
  
  
  
  public static void main(String[] args) 
  {
      launch(args);
  }
  
  }
  </code></pre>
  
  <p>This is the Stack class.</p>
  
  <pre><code>public class Stack&lt;E&gt;
  {
  public String status = "String";
  
  public ArrayList&lt;E&gt; arrayList;
  
  
  public Stack()
  {
      arrayList = new ArrayList(10);
  }
  
  
  public void add(String x)
  {
      arrayList.add(0, (E) x);
  }
  
  //public String del
  {
  
  }
  
  public void Clear()
  {
  
  }
  
  }
  </code></pre>