Непонятное исключение ...
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTabbedPaneUI.calculateTabWidth(BasicTabbedPaneUI.java:1443)
at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateTabRects(BasicTabbedPaneUI.java:2242)
at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.calculateLayoutInfo(BasicTabbedPaneUI.java:2170)
at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneLayout.layoutContainer(BasicTabbedPaneUI.java:2085)
at java.awt.Container.layout(Container.java:1017)
at java.awt.Container.doLayout(Container.java:1007)
at java.awt.Container.validateTree(Container.java:1089)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validateTree(Container.java:1096)
at java.awt.Container.validate(Container.java:1064)
at java.awt.Window.dispatchEventImpl(Window.java:1588)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Что за шит и как это побороть?
вообще, NullPointerException по документации:
Цитата:
Thrown when an application attempts to use null in a case where an object is required. These include:
- Calling the instance method of a null object.
- Accessing or modifying the field of a null object.
- Taking the length of null as if it were an array.
- Accessing or modifying the slots of null as if it were an array.
- Throwing null as if it were a Throwable value.
- Applications should throw instances of this class to indicate other illegal uses of the null object.