Button click event

Hello, i'm programing a generator of graphs for mathematical expressions, and i put a funtion to move the graph, i move it with jbuttons.

the problem i have if that i must do click to move the graph,

my question is: how can i do to make posible to make the graph move holding the mouse button press?.

can someone help me?

Thanks.

[362 byte] By [lenjrda] at [2007-11-26 15:23:15]
# 1
In the future, Swing related questions should be posted in the Swing forum.Use a Swing Timer. Add a MouseListener to the button. On mousePressed you start the Timer. On mouseReleased you stop the Timer.
camickra at 2007-7-8 21:38:27 > top of Java-index,Java Essentials,Java Programming...