Question

In my JfreeChart application I need to perform some actions when the user clicks the mouse on the chart. For this, I have a inner class that implements the ChartMouseListener and an instance of this class added as a chartMouseListener to the chartPanel.

The strange thing , which I cannot comprehend why , is that sometimes when I click the mouse, the application doesn't detects the click (like somehow this event wasn't registered) .It usually happens like 2,3 times out of 10. Has someone encountered such o problem ? Where should I check to fix this ?

Was it helpful?

Solution

Have you implemented both the chartMouseClicked() and chartMouseMoved() handlers ? I'm wondering if you're inadvertently generating a move/drag rather than a click ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top