wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Exception in thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Exception in thread "AWT-EventQueue-0"  error" Watch "Exception in thread "AWT-EventQueue-0"  error" New topic

Exception in thread "AWT-EventQueue-0" error

Shaun Seah

Joined: Mar 15, 2011
Posts: 3
Hi guys, I am having difficulty trying to debug this exception....

My swing apps, retrieves record from Database and is wrapped by a TableModel.
Finally this is passed into a JTable.

Finally this app is multi-thread, meaning it can accept multiple database queries and repaint the same Jtable once the query is completed.

please help. thanks.

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1 >= 1
at java.util.Vector.elementAt(Vector.java:427)
at javax.swing.table.DefaultTableColumnModel.getColumn(DefaultTableColumnModel.java:277)
at javax.swing.plaf.basic.BasicTableHeaderUI.paint(BasicTableHeaderUI.java:632)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
at javax.swing.JComponent.paintComponent(JComponent.java:752)
at javax.swing.JComponent.paint(JComponent.java:1029)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5124)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
at javax.swing.RepaintManager.paint(RepaintManager.java:1224)
at javax.swing.JComponent._paintImmediately(JComponent.java:5072)
at javax.swing.JComponent.paintImmediately(JComponent.java:4882)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:785)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:713)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:693)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Darryl Burke

Joined: May 03, 2008
Posts: 4658

Did you go through the tutorial on Concurrency in Swing that I recommended in your earlier thread? Or did you just never return to that thread to read the response there?

luck, db
There are no new questions, but there may be new answers.
Shaun Seah

Joined: Mar 15, 2011
Posts: 3
Hi Darryl,

Am still working on the previous thread...i didn't think this issue was related to my previous query.
Sorry for the double post.

Darryl Burke

Joined: May 03, 2008
Posts: 4658

My reason for asking is that this issue also looks like being related to concurrency and not abiding by Swing's single threaded rule.
subject: Exception in thread "AWT-EventQueue-0" error