ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  TrackCursorListener not receiving events
Posted by fpinero on Jun-30-2014 06:20
Hi,

I'm trying to add a trackaxis to the FinanceDemo java code. But the listener is ignored. No
event is received.

chartViewer1.addTrackCursorListener(new TrackCursorAdapter() {
            @Override
            public void mouseMovedPlotArea(MouseEvent e) {
                System.out.println("This is an event");
                }
        });

In all the examples I've seen, the viewer was added to a JFrame, but in this case the
viewer is added to a JPanel. Can this be the reason why I'm not receiving the mouse
events?.
I'm stuck with this. Any help would be very appreciated.

Thank You very much.

  Re: TrackCursorListener not receiving events
Posted by fpinero on Jun-30-2014 15:19
Hi,

I figured out where was my mistake. I was adding the chart as a image
viewer.setImage(m.makeImage());

once changed to
viewer.setChart(m);

works fine.

Thank You.