@Override
        public void stateChanged(ChangeEvent e) {
            // Test for flag. Otherwise, if we scroll unconditionally, 
            // the scroll bar will be stuck at the bottom even when the 
            // user tries to drag it. So we only scroll when we know 
            // we've added text
            if (shouldScroll) {
                JScrollBar vertBar = receivePane.getVerticalScrollBar();
                vertBar.setValue(vertBar.getMaximum());
                shouldScroll = false;
            }
        }