public void clearAllLines(){
  if (textArea != null) {
    textArea.setText("");
  }
}

public void clearAllLines ( ) { if ( textArea != null ) { textArea . setText ( "" ) ; } }
set the text area to empty .
