Menu

#142 IndexOutOfBounds exception in Dynamic Chart

open
nobody
General (896)
5
2012-11-27
2003-03-19
Seva Batkin
No

I have a JPanel using GridLayout which contains
two JFreeChart objects. They are both time
based and are dynamically updated by the a
single thread. Every time i run it I get the
IndexOutOfBounds exception. It doesn't actually
stop the process but seems annoying
nontheless.

java.lang.IndexOutOfBoundsException: Index: 87,
Size: 87
at java.util.ArrayList.RangeCheck
(ArrayList.java:508)
at java.util.ArrayList.get
(ArrayList.java:320)
at
com.jrefinery.data.TimeSeries.getDataPair
(Unknown Source)
at
com.jrefinery.data.TimeSeriesCollection.getXValu
e(Unknown Source)
at
com.jrefinery.chart.renderer.StandardXYItemRend
erer.drawItem(Unknown Source)
at com.jrefinery.chart.plot.XYPlot.render
(Unknown Source)
at com.jrefinery.chart.plot.XYPlot.draw
(Unknown Source)
at com.jrefinery.chart.JFreeChart.draw
(Unknown Source)
at
com.jrefinery.chart.ChartPanel.paintComponent
(Unknown Source)
at javax.swing.JComponent.paint
(JComponent.java:808)
at
javax.swing.JComponent.paintWithOffscreenBuffe
r(JComponent.java:4771)
at
javax.swing.JComponent.paintDoubleBuffered
(JComponent.java:4724)
at
javax.swing.JComponent._paintImmediately
(JComponent.java:4668)
at
javax.swing.JComponent.paintImmediately
(JComponent.java:4477)
at
javax.swing.RepaintManager.paintDirtyRegions
(RepaintManager.java:410)
at
javax.swing.SystemEventQueueUtilities$Compon
entWorkRequest.run
(SystemEventQueueUtilities.java:117)
at
java.awt.event.InvocationEvent.dispatch
(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent
(EventQueue.java:448)
at
java.awt.EventDispatchThread.pumpOneEventFor
Hierarchy(EventDispatchThread.java:197)
at
java.awt.EventDispatchThread.pumpEventsForHi
erarchy(EventDispatchThread.java:150)
at
java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:144)
at
java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run
(EventDispatchThread.java:99)

Discussion


Log in to post a comment.