title: How can I make a TextArea fill the center of the screen?
body: <p>I am using JavaFx, and I want to create a TextArea to fill the center of the screen. I am trying to a BorderPane, but no matter where in the Pane I set it (Top, Bottom, Center, etc.) it is always at the top of the screen. I also cannot get it to resize the number of cols.</p>
  
  <pre><code>    primaryStage.setTitle("Cauldron");
      VBox root = new VBox();
      Scene scene = new Scene(root, 1280, 720);
      BorderPane borderPane = new BorderPane();
  
      MenuBar menuBar  = new MenuBar();
      Menu    menuFile = new Menu("File");
      Menu    menuEdit = new Menu("Edit");
      Menu    menuView = new Menu("View");
      Menu    menuHelp = new Menu("Help");
  
      menuBar.getMenus().addAll(menuFile,menuEdit,menuView,menuHelp);
      borderPane.setTop(menuBar);
  
      TextArea textArea = new TextArea();
      borderPane.setCenter(textArea);
  
      root.getChildren().add(borderPane);
      primaryStage.setScene(scene);
      primaryStage.show();
  </code></pre>
  
  <p>This is my code,<a href="https://i.stack.imgur.com/wdBx7.png" rel="nofollow noreferrer"> and this is what it creates.</a></p>