ArrayIndexOutOfBoundsException: 0 >= 0

Hi, All

I have developed a swing based application and somtimes while running the application Application gives Exception as ....

--

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

at java.util.Vector.elementAt(Vector.java:427)

at javax.swing.table.DefaultTableColumnModel.getColumn(DefaultTableColumnModel.java:277)

at javax.swing.plaf.basic.BasicTableUI.paintGrid(BasicTableUI.java:1926)

at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1762)

at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)

at javax.swing.JComponent.paintComponent(JComponent.java:758)

at javax.swing.JComponent.paint(JComponent.java:1022)

at javax.swing.JComponent.paintToOffscreen(JComponent.java:5104)

at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)

at javax.swing.RepaintManager.paint(RepaintManager.java:1128)

at javax.swing.JComponent._paintImmediately(JComponent.java:5052)

at javax.swing.JComponent.paintImmediately(JComponent.java:4862)

at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:723)

at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)

at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)

at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Please help me out to debug the reson for this error, Because looking at stackTrace I can't see any of the Class names developed by me......

Application is not effected by this error....But where from this is thrown

Thanks .. :)

[2384 byte] By [SUSHANT_Ja] at [2007-11-27 10:34:47]
# 1

You probably pass a wrong JTable column index somewhere in your application code.

Or your code tries (maybe indirectly) to access a JTable column that is not yet created.

Maybe posting some code would help us find the error..

Message was edited by:

Andre_Uhres

Andre_Uhresa at 2007-7-28 18:31:06 > top of Java-index,Desktop,Core GUI APIs...
# 2

Thanks, I will have to chek for this and it might work. :)

I checked for this possiblites but there is no such problem.....Any more points...

Message was edited by:

SUSHANT_J

SUSHANT_Ja at 2007-7-28 18:31:06 > top of Java-index,Desktop,Core GUI APIs...
# 3

> ...Any more points...

Did you consider my last point?

Andre_Uhresa at 2007-7-28 18:31:06 > top of Java-index,Desktop,Core GUI APIs...
# 4

Yes,... I have mentioned that I checked for the two possiblites you suggested which might be causing the problem, but I found no such case with my code....Thank you

There might be some other problem ..... This error is not thrown every time but it is 1/50 times frequent....Thanks

SUSHANT_Ja at 2007-7-28 18:31:06 > top of Java-index,Desktop,Core GUI APIs...
# 5

I was meaning:

Maybe posting some code would help us find the error..

Andre_Uhresa at 2007-7-28 18:31:06 > top of Java-index,Desktop,Core GUI APIs...