title: Delete first Line of a JavaFx Textarea
body: <p>Hello I want to delete the first line of a JavaFx textarea.
  I set a TextFormatter on my Textarea and i want to delete the first line, when more then 20 lines are in it:</p>
  
  <pre><code>private &lt;T&gt; TextFormatter&lt;T&gt; createTextFormatter() {
  
      final IntegerProperty lines = new SimpleIntegerProperty(1);
  
  
      return new TextFormatter&lt;&gt;(change -&gt; {
          if (change.isAdded()) {
              if (change.getText().indexOf('\n') &gt; -1) {
                  lines.set(lines.get() + 1);
              }
              if (lines.get() &gt; 20) {
                  //TODO
                  //delete first row
              }
          }
          return change;
      });
  }
  </code></pre>
  
  <p>II would be glad if someone could help</p>
  
  <p>Thanks</p>