title: New Line in TextField
body: <p>I am trying to have some pre-defined text in my TextField, but I don't know how to add new lines in between the words. I tried \n, but it isn't working.</p>
  
  <p>Code:</p>
  
  <pre><code>    package view;
  
  import javafx.scene.text.Text;
  
  public class Overview extends VBox{
  
      private TextField info;
  
      public Overview() {
  
          //Adds a little border around the app so the text field doesn't go to the edges
          this.setPadding(new Insets(30, 30, 30, 30));
  
          //----- Initialising text field --------
          info = new TextField("Name:\n" + "PNumber:\n"+ "Email:\n"+ "Date:\n"+ "Course:\n"+ ""+ "Selected Modules:\n"+ "==============");
          info.setAlignment(Pos.TOP_LEFT);
          info.setMinHeight(850);
          info.setEditable(false);
  
  
          //------ Adding the text to the Text Field --------
  
  
          //-------- Putting it into VBox so that it stretches with the screen ----------
          VBox fit = new VBox(info);
  
  
  
  
          this.getChildren().add(fit);
  
      }
  
  }
  </code></pre>
  
  <p>Does anyone know how to add a newline between each word?
  I want there to be a separation between words and then it will automatically fill in the information later.</p>