java.lang.ArrayIndexOutOfBoundsException: No such child: 1
at java.awt.Container.getComponent(Container.java:237)
at javax.swing.JComponent.rectangleIsObscured(JComponent.java:3684)
at javax.swing.JComponent.paint(JComponent.java:802)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:552)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4735) at
javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4688)
at javax.swing.JComponent._paintImmediately(JComponent.java:4632)
at javax.swing.JComponent.paintImmediately(JComponent.java:4464)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:404) at
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:443)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130) at
java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Thanx,
Anand
> I am facing a strage problem with java gui.
> It is giving the following exception.
> did anybody know what is the cause of this exception
Since this is occurring while the system is trying to paint, can you give us
the smallest complete, compilable sample that demonstrates the fault?
--
--
Jason Teagle
ja...@teagster.co.uk
-----------------------------------------------------------
A list of programming resources I use:
ML: www.windev.org, www.codecipher.com, www.beginthread.com
MB: www.codeguru.com, www.codeproject.com
NG: comp.lang.java.*
OI: www.php.net
-----------------------------------------------------------
It's because you are refering to a index within an array, which is
bigger than it's size. Ex:
int[] a = new Integer[10];
..
..
System.out.println("A: " + a[10]);
Remember that an array starts with the index 0 (zero)!
Therefore the last index in the array is number 9.