• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Error on JTabbePane  RSS feed

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Richard Teston
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it, the problem with the code is tabMain.setLayout( new GridBagLayout() );
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!