question: public final void print ( String value ) { try { Element rootElement = workDoc . getDefaultRootElement ( ) ; int deleteLines = rootElement . getElementCount ( ) - linesMax ; for ( int index = 0 ; index < deleteLines ; index ++ ) { Element elem = rootElement . getElement ( 0 ) ; workDoc . remove ( elem . getStartOffset ( ) , elem . getEndOffset ( ) ) ; } workDoc . insertString ( workDoc . getLength ( ) , value , null ) ; textArea . setCaretPosition ( workDoc . getLength ( ) ) ; } catch ( Exception exc ) { exc . printStackTrace ( ) ; } }
target:  Prints a string without adding a /n at the end.