posted 18 years ago
To change the scroll position, first retrieve the scrollbar and then use the setValue method, like so:
This should scroll to the top of the view.
However, I am not sure when you need to call this code in order to do what you want. Perhaps you could add an AdjustmentListener to the JScrollBar, but I'm sure there must be a better way...