posted 22 years ago
i have this simple GUI design program which when i run it produces this following error:
java.lang.ArrayIndexOutOfBoundsException
at javax.swing.plaf.basic.BasicTabbedPaneUI.paintTabArea(BasicTabbedPane
UI.java:544)
at javax.swing.plaf.basic.BasicTabbedPaneUI.paint(BasicTabbedPaneUI.java
:497)
at javax.swing.plaf.metal.MetalTabbedPaneUI.paint(MetalTabbedPaneUI.java
:666)
at javax.swing.plaf.metal.MetalTabbedPaneUI.update(MetalTabbedPaneUI.jav
a:561)
at javax.swing.JComponent.paintComponent(JComponent.java:537)
at javax.swing.JComponent.paint(JComponent.java:804)
at javax.swing.JComponent.paintChildren(JComponent.java:643)
at javax.swing.JComponent.paint(JComponent.java:813)
at javax.swing.JComponent.paintChildren(JComponent.java:643)
at javax.swing.JComponent.paint(JComponent.java:813)
at javax.swing.JComponent.paintChildren(JComponent.java:643)
at javax.swing.JComponent.paint(JComponent.java:813)
at javax.swing.JComponent.paintChildren(JComponent.java:643)
at javax.swing.JComponent.paint(JComponent.java:813)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:552)
at javax.swing.JComponent.paintChildren(JComponent.java:643)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4742)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4688)
at javax.swing.JComponent.paint(JComponent.java:794)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:
60)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97
)
at java.awt.Container.paint(Container.java:1123)
at sun.awt.RepaintArea.paint(RepaintArea.java:180)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
at java.awt.Component.dispatchEventImpl(Component.java:3586)
at java.awt.Container.dispatchEventImpl(Container.java:1437)
at java.awt.Window.dispatchEventImpl(Window.java:1566)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:190)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.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)
I think the error is in repainting JTabbedPane i dont know what causes this error, please help me point out whats wrong with my code. Thanks in advance.
The Code is the Programmer