This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Max Diaz
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2787
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!