title: Having trouble aligning text using javaFX
body: <p>I barely started learning javaFX today, and I'm really confused about the text node. The text I made won't align in the center. I tried using a Pane, GridPane, and now a VBox. Does that have anything to do with it? 
  <code>-fx-text-alignment: center;</code> But that didn't work either. Im really new to this. Thank you anyone for the help! Here is my code:</p>
  
  <pre><code>        package dev.angarc.game;
  
  import javafx.application.Application;
  import javafx.scene.Scene;
  import javafx.scene.layout.VBox;
  import javafx.scene.text.Font;
  import javafx.scene.text.FontPosture;
  import javafx.scene.text.FontWeight;
  import javafx.scene.text.Text;
  import javafx.scene.text.TextAlignment;
  import javafx.stage.Stage;
  
  public class Game extends Application{
  
      public static void main(String[] args){
          launch(args);
      }
  
      @Override
      public void start(Stage stage){
  
          VBox vbox = new VBox();
  
          // Component stuff
  
          Text text = new Text("This Text Wont Align To The Center!");
          text.setFont(Font.font("Arial", FontWeight.NORMAL, FontPosture.REGULAR, 20));
          text.setTextAlignment(TextAlignment.CENTER);
  
          // adding to the pane
          vbox.getChildren().add(text);
  
          // Stuff to set up the window.
                  stage.setScene(new Scene((vbox), 640, 430));
                  stage.setTitle("Text Game");
                  stage.setResizable(false);
                  stage.show();
  
      }
  
  }
  </code></pre>