getting the time interval of a mouse being pressed

Hai I am developing an image scrolling application .And i have a JButton to scroll the image . The problem is that i need to scroll the image proportional to the time the user presses the button. How can i do it ? Thanks in advance
[259 byte] By [shan_proa] at [2007-10-2 21:54:44]
# 1

Hai

I did it in a way which i am not sure to be apprpriate. I started a thread (defined in an innerclass) in the mouse pressed event of the button and stopped the thread in the mousereleased event .

Any body with a different elegant idea kindly make me aware of it.

Any one facing the same issue may try this method and give me a feedback

Thank you

shan_proa at 2007-7-14 1:10:44 > top of Java-index,Security,Event Handling...