File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT / JFace and the fly likes Trying to implement autoscrolling on a jpanel that has a jscrollpane. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Trying to implement autoscrolling on a jpanel that has a jscrollpane." Watch "Trying to implement autoscrolling on a jpanel that has a jscrollpane." New topic
Author

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

Max Diaz
Greenhorn

Joined: Feb 19, 2010
Posts: 6
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?
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 1644

This message was edited 1 time. Last update was at by Rob Camick

 
 
subject: Trying to implement autoscrolling on a jpanel that has a jscrollpane.
 
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture