Hi,
I new to JFreeChart and have been trying to use it to draw some real time graphs for my application.
However, I have run into some performance issues:
I have a Java swing Frame that has some comboboxes and buttons on it. After I have changed the selections in the comboboxes, I press "Show" button on my InternalFrame to pop up a new InternalFrame that draws my Graph. My problem is that after I open the graph page, all the controls on my previous Frame do no get refreshed properly. e.g, setext on the button doesn't work, Combobox selection don't change etc. I have tried calling repaint(), validate() on my Frame but no effect.
as soon as I close my graph, everything works as per normal.
Please help.
Java Swing and JFreeChart
I guess you are drawing the graph in a loop, perhaps only to test it. This may prevent the event dispatching thread from updating the rest of your UI.
In real life you will have an external event that causes the graph to update. The time period between the events should give enough time for an UI update.
For now you could try to use SwingUtilities.invokeLater() from another thread to update your graph periodically. Sleep for a second or so before repeating the call.
In real life you will have an external event that causes the graph to update. The time period between the events should give enough time for an UI update.
For now you could try to use SwingUtilities.invokeLater() from another thread to update your graph periodically. Sleep for a second or so before repeating the call.
Cheers, Sir Henry