Elo guys, i have been trying to create a real-time graph for my application!! I'm using JFree_Graph!
I have modifed a code so as to include a thread but eventually got errors.
[copyrighted code removed]
And the output is
Entering Thread
Now = Wed Mar 12 14:58:16 EET 2008
Entering Thread
Now = Wed Mar 12 14:58:17 EET 2008
Entering Thread
Now = Wed Mar 12 14:58:17 EET 2008
Exception in thread "Thread-2" org.jfree.data.general.SeriesException: You are attempting to add an observation for the time period Wed Mar 12 14:58:17 EET 2008 but the series already contains an observation for that time period. Duplicates are not permitted. Try using the addOrUpdate() method.
at org.jfree.data.time.TimeSeries.add(TimeSeries.java:497)
at org.jfree.data.time.TimeSeries.add(TimeSeries.java:526)
at newGraph.captureData(newGraph.java:162)
at newGraph$1.run(newGraph.java:187)
at java.lang.Thread.run(Unknown Source)
Some points have been plotted but then the error occurs!!
Can anyone please take a look at the code please!
thanks!