2

Is it possible to change to cursor in JFreechart from the normal cursor into hand cursor,

together with a ball run across the chart like the chart in this link :

http://cafef.vn/Thi-truong-niem-yet/Bieu-do-ky-thuat/EPS-HNX-2.chn

I have no idea how it could be done in Jfreechart?

Thanks!

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
Thanh Nguyen
  • 81
  • 2
  • 5
  • Have you checked these: http://stackoverflow.com/questions/6615940/changing-the-mouse-pointer-in-jtextpane and http://stackoverflow.com/questions/7359189/how-to-change-the-mouse-cursor-in-java – assylias Feb 23 '12 at 12:55
  • Are you this [user](http://stackoverflow.com/users/1173652/nguyen-hoai-thanh)? – trashgod Feb 24 '12 at 06:21

1 Answers1

2

Just add your chart to a ChartPanel and call addMouseMotionListener(). For the listener, use a MouseAdapter that sets the cursor how your want it in mouseEntered() and mouseExited(). Here's the tutorial.

Catalina Island
  • 7,027
  • 2
  • 23
  • 42