Hi,
I've got a graph with up to 10 plot lines at a time. I've enabled the legend items to be mouse enabled so that I can change the color of the plot according to which legend item is entered. What I do is the following:
public void mouseEntered(MouseEvent e) {
setBackground(Color.WHITE);
plot.setLineColor(Color.red.brighter());
plot.setUpdateFlag(true);
}
public void mouseExited(MouseEvent e) {
setBackground(BACKGROUND_COLOR);
plot.setLineColor(this.textColor);
plot.setUpdateFlag(true);
}
where plot is:
private SimplePlot plot;
Unfortunately, this doesn't work. I want the item to turn red so as to be highlighted when the mouse is over the legend item. I thought that turning the lineColor to the newly desired color would make the plot in the graph change. No go...
Can you tell me what else I need to do to affect the change? Do I need to call something in the graph or what?
many thanx.
Thanx - Joe!