Hi. I have created an application wherein I am showing a large image inside a JScrollPane .
As I move my mouse over the image within the jscrollpane i want to display the RGB values of the pixel under the mouse pointer on a status bar.
I am able to retrieve mouse coordinates relative to the jscrollpane , but when I scroll down I still get the same moouse coordinates . How do I know by how many pixels have I scrolled down , so that I can add that to the Y coordinate of the mouse ?