I have a simple app that allows users to mark up a PDF document by dragging/dropping predefined widgets into a separate layer.
I am using a JScollPane. The viewport size is the equivalent of a single 8.5x11 page. When the VScrollBar is at the minimum position, the top of the page displays; at the maximum position, the bottom displays. I would like to override this behavior. The minimum position should display the top of the first page, and the maximum should display the bottom of the last page.
Among the dead ends I've hit: Replacing the ScrollBar built into the JScrollPane; Intercepting the AdjustmentEvent fired by the VScrollBar; and studying the ScrollDemo example. This seems like a straightforward feature, but I'm stuck at the beginning.
Any suggestions? Thanks!