Hi there,
I have a JEditorPane inside a JScrollPane. My program adds text to the editorPane and I'd like to have it always scroll to the bottom whenever new text is added. I tried this:
but it causes it to scroll to what seems to be random positions. Sometimes it ends up at the bottom, but most of the time not.
Any ideas?
________________________
JoelMac
I have a JEditorPane inside a JScrollPane. My program adds text to the editorPane and I'd like to have it always scroll to the bottom whenever new text is added. I tried this:
Code:
historyScrollPane.getVerticalScrollBar().setValue(historyScrollPane.getVerticalScrollBar().getMaximum());
Any ideas?
________________________
JoelMac