private void scrollDown(){
  if (fixedChat) {
    return;
  }
  try {
    int endPosition=doc.getLength();
    Rectangle bottom=modelToView(endPosition);
    if (bottom != null) {
      bottom.height=bottom.height + 100;
      scrollRectToVisible(bottom);
    }
  }
 catch (  BadLocationException ex) {
    LOGGER.warning("Bad Location");
  }
}

private void scrollDown ( ) { if ( fixedChat ) { return ; } try { int endPosition = doc . getLength ( ) ; Rectangle bottom = modelToView ( endPosition ) ; if ( bottom != null ) { bottom . height = bottom . height + 100 ; scrollRectToVisible ( bottom ) ; } } catch ( BadLocationException ex ) { LOGGER . warning ( "Bad Location" ) ; } }
scrolls to the very end of the document .
