我在重繪對象列表時遇到以下異常。我無法找到此錯誤發生的位置,因爲我看不到對應用程序文件的引用。繪製列表時發生Java錯誤
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1
at java.util.Vector.elementAt(Vector.java:341)
at javax.swing.tree.VariableHeightLayoutCache.updateNodeSizes(VariableHeightLayoutCache.java:908)
at javax.swing.tree.VariableHeightLayoutCache.getBounds(VariableHeightLayoutCache.java:212)
at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:521)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1184)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:154)
at javax.swing.JComponent.paintComponent(JComponent.java:763)
at javax.swing.JComponent.paint(JComponent.java:1040)
at javax.swing.JComponent.paintChildren(JComponent.java:873)
at javax.swing.JComponent.paint(JComponent.java:1049)
at javax.swing.JViewport.paint(JViewport.java:758)
at javax.swing.JComponent.paintChildren(JComponent.java:873)
at javax.swing.JComponent.paint(JComponent.java:1049)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5135)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1490)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1421)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:305)
at javax.swing.RepaintManager.paint(RepaintManager.java:1235)
at javax.swing.JComponent._paintImmediately(JComponent.java:5083)
at javax.swing.JComponent.paintImmediately(JComponent.java:4893)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:724)
at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:704)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:136)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:220)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:650)
at java.awt.EventQueue.access$000(EventQueue.java:95)
at java.awt.EventQueue$1.run(EventQueue.java:613)
at java.awt.EventQueue$1.run(EventQueue.java:611)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:29)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:621)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:280)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:180)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:172)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:133)
+1本文引用的文章提出了幾種識別EDT違規的方法。 – trashgod