This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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
Author

Exception in thread "AWT-EventQueue-0" error

Shaun Seah
Greenhorn

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
Bartender

Joined: May 03, 2008
Posts: 4572
    
    5

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
Greenhorn

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.

thanks
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4572
    
    5

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