Forums Register Login

Trying to implement autoscrolling on a jpanel that has a jscrollpane.

+Pie Number of slices to send: Send
The effect I am trying to get is when the user has his/her mouse pointer at a certain pixel location the scroll bar automatically scrolls to the right until, they mouse isnt at that position anymore. Here is what I have so far...


This works somewhat. The problem is that the mouseMoved event is only fired when the mouse is moved, so to get the scrollpane to scroll you have to constantly move the mouse. Now I looked at other mouse events like mouseEnter or mouseDragged but they have the same problem. Anyone have any ideas?
+Pie Number of slices to send: Send
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1815 times.
Similar Threads
Getting the X, Y coordinate values in a JChart
display mouse pointer coordinates
jtable and the scrollbar
Movement event
how to get rid off flickering in JOptionPane dialog
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 20:20:37.