About Me

My photo
Drum & Bass Producer, Software Developer, Love my Cats

JTextPane autoscroll

How to scroll to the end of an updating JTextPane

While working on a Chat client for school, I needed a way to scroll down to the end of the chat conversation JTextPane every time a message was sent.

I found the solution in coderanch.com

JTextPane output = new JTextPane();

javadoc for setCaretPosition()