Smart JScrollPane autoscrolling
I am attempting to implmement smart autoscrolling on a JScrollPane containing a JTextPane. The JTextPane is used for logging my app in color. However I'm running into a wall trying to do smart autoscrolling. By smart autoscrolling I don't mean blindly autoscrolling every time something changes, I mean checking to see if your scrolled all the way down, then autoscroll. However no matter what I do it either always autoscrolls or doesn't at all As a test script, here's the setup (the JFrame has been left out) final JTextPane textPane = new JTextPane(); textPane.setEditable(false); final