question: protected void appendString ( final String text ) { final HTMLDocument doc = ( HTMLDocument ) textPane . getDocument ( ) ; try { final Element root = doc . getParagraphElement ( 0 ) ; doc . insertBeforeEnd ( root , text ) ; } catch ( final BadLocationException e ) { logger . error ( e , e ) ; } catch ( final IOException e ) { logger . error ( e , e ) ; } }
target:  Append HTML text to the end of the content. Note: Currently elements must be complete to be added correctly.