title: JavaFX ListView being covered by TextArea using GridPane
body: <p>I am working on a little game with a GUI, I am having a problem with the layout.</p>
  
  <p>When I run it I get this:</p>
  
  <p><a href="https://i.stack.imgur.com/YGiXX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YGiXX.jpg" alt="Image"></a></p>
  
  <p>The <code>ListView</code> is being covered by the <code>TextArea</code>, I am trying to get it next to it. Like in this example:</p>
  
  <p><a href="https://i.stack.imgur.com/unljx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/unljx.jpg" alt="Image2"></a></p>
  
  <p>Here is the code I have so far:</p>
  
  <pre><code>import javafx.application.Application;
  import javafx.geometry.Insets;
  import javafx.geometry.VPos;
  import javafx.scene.Scene;
  import javafx.scene.control.Button;
  import javafx.scene.control.Label;
  import javafx.scene.control.ListView;
  import javafx.scene.control.TextArea;
  import javafx.scene.layout.GridPane;
  import javafx.stage.Stage;
  
  public class test extends Application {
  
      Stage window;
      ListView&lt;String&gt; listView;
      TextArea descArea = new TextArea();
      TextArea actionDescArea = new TextArea();
      Label healthLabel = new Label("Health:");
      Label manaLabel = new Label("Mana:");
      Label healthDisplay = new Label("100/100");
      Label manaDisplay = new Label("100/100");
      Button actionBtn = new Button("Action");
  
      public static void main(String[] args) {
          launch(args);
      }
  
      @Override
      public void start(Stage primaryStage) throws Exception {
          window = primaryStage;
          window.setTitle("Game");
  
          GridPane grid = new GridPane();
          grid.setPadding(new Insets(10, 10, 10, 10));
          grid.setVgap(10);
          grid.setHgap(10);
  
          descArea.setPrefWidth(750);
          descArea.setPrefHeight(550);
          descArea.setWrapText(true);
          descArea.setEditable(false);
          GridPane.setConstraints(descArea, 0, 0, 1, 2);
  
          GridPane.setConstraints(healthLabel, 1, 0);
          GridPane.setValignment(healthLabel, VPos.TOP);
  
          GridPane.setConstraints(healthDisplay, 2, 0);
          GridPane.setValignment(healthDisplay, VPos.TOP);
  
          GridPane.setConstraints(manaLabel, 1, 1);
          GridPane.setValignment(manaLabel, VPos.TOP);
  
          GridPane.setConstraints(manaDisplay, 2, 1);
          GridPane.setValignment(manaDisplay, VPos.TOP);
  
          listView = new ListView&lt;&gt;();
          listView.getItems().addAll("Action 1", "Action 2", "Action 3", "Action 4");
          listView.setPrefWidth(260);
          listView.setMaxWidth(260);
          listView.setPrefHeight(150);
          GridPane.setConstraints(listView, 0, 2, 1, 1);
  
          actionDescArea.setPrefWidth(100);
          actionDescArea.setPrefHeight(150);
          actionDescArea.setMaxWidth(100);
          actionDescArea.setWrapText(true);
          actionDescArea.setEditable(false);
          GridPane.setConstraints(actionDescArea, 0, 2, 2, 1);
  
          actionBtn.setPrefWidth(260);
          actionBtn.setPrefHeight(60);
          GridPane.setConstraints(actionBtn, 0, 3);
  
          grid.getChildren().addAll(descArea, healthLabel, healthDisplay, manaLabel, manaDisplay, listView, actionBtn, actionDescArea);
  
          Scene scene = new Scene(grid, 950, 750);
          window.setScene(scene);
          window.show();
      }
  </code></pre>
  
  <p>If anyone could point me in the right direction, that would be great! </p>
  
  <p>Thanks :)</p>