Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Exception with no throwing place in my code

800465May 15 2009 — edited May 15 2009
Hi,
when I run my program I often (which is very weird, because sometimes when I do the exactly same steps in my program it gives me the exception only sometimes) and the exception has no place tracked in my code , here it is:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: No such child: 0
        at java.awt.Container.getComponent(Container.java:281)
        at javax.swing.JComponent.rectangleIsObscured(JComponent.java:4337)
        at javax.swing.JComponent.paint(JComponent.java:1025)
        at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)
        at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
        at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
        at javax.swing.JComponent._paintImmediately(JComponent.java:5070)
        at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
        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)
does anyone know what should I do to catch this exception?

thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2009
Added on May 15 2009
3 comments
238 views