title: Writing Contents of TextArea to File
body: <p>I'm currently converting all my old applications in Java that use the "J" components
  to the newer, more trendy JavaFX platform.</p>
  
  <p>Previously in one of my application, you were able to write the contents of a TextArea to a file,nicely spaced an indented, as you graphically saw it in the text area. You did this by using the write() method that the JTextArea class inherited.</p>
  
  <p>Is there anyway to do this with a JavaFX text area, or can I even be able to parse through the file and do it that way?</p>
  
  <p>Assistance would be greatly appreciated!</p>
  
  <p><strong>Code used in JTextArea to write files:</strong></p>
  
  <pre><code>public static void writeFile(File fileName) throws IOException{
      BufferedWriter fileOut = new BufferedWriter(new FileWriter(fileName));
      Gui.getTextArea().write(fileOut);
  }
  </code></pre>