I have a JScrollPane. And I would like to know how much has been scrolled.  

So if user is scrolling down, then I want to know in pixels or any other unit of measurement how far away the top is from what I am looking at.  

The reason for that is I would like to do some drawing based on the amount scrolled, and in order for drawing to work I need to know the said amount to the top.