Unresolvable Exception in Application

Hi,

I am creating and updating a JTable regularly by removing and re-adding the updated row in the table.

The program is running fine, it however generates irregular exceptions at regular intervals. The exception is:

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException:

0 >= 0

at java.util.Vector.elementAt(Unknown Source)

at javax.swing.table.DefaultTableModel.getValueAt(Unknown Source)

at javax.swing.JTable.getValueAt(Unknown Source)

at javax.swing.JTable.prepareRenderer(Unknown Source)

at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)

at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)

at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)

at javax.swing.plaf.ComponentUI.update(Unknown Source)

at javax.swing.JComponent.paintComponent(Unknown Source)

at javax.swing.JComponent.paint(Unknown Source)

at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source)

at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)

at javax.swing.JComponent._paintImmediately(Unknown Source)

at javax.swing.JComponent.paintImmediately(Unknown Source)

at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)

at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknow

n Source)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

Someone please help. This is driving me nuts.

[1925 byte] By [Natza] at [2007-11-26 22:48:27]
# 1
<deleted, didn't read original post>
jsalonena at 2007-7-10 12:08:14 > top of Java-index,Java Essentials,Java Programming...
# 2
> I am creating and updating a JTable regularly by> removing and re-adding the updated row in the table.> Are you doing this from the event-dispatching thread? If not, that may explain the exceptions.
Torgila at 2007-7-10 12:08:14 > top of Java-index,Java Essentials,Java Programming...