JTabbedPane throws ArrayIndexOutOfBoundsException when a new tab is inserted

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 5.0
    • Component/s: client-libs

      JTabbedPane throws ArrayIndexOutOfBoundsException when a new tab is inserted. I've seen a similar bug (4286825). It looks like the bug was fixed, but I am still seeing problems.

      You can try to run attached java code. Click "Test"/"Auto" ...
        java.lang.ArrayIndexOutOfBoundsException: 3
              at javax.swing.plaf.basic.BasicTabbedPaneUI.tabForCoordinate(BasicTabbedPaneUI.java:1267)
              at javax.swing.plaf.basic.BasicTabbedPaneUI.setRolloverTab(BasicTabbedPaneUI.java:485)
              at javax.swing.plaf.basic.BasicTabbedPaneUI.access$1100(BasicTabbedPaneUI.java:35)
              at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mouseEntered(BasicTabbedPaneUI.java:3176)
              at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:241)
              at java.awt.Component.processMouseEvent(Component.java:5472)
              at javax.swing.JComponent.processMouseEvent(JComponent.java:3052)
              at java.awt.Component.processEvent(Component.java:5228)
              at java.awt.Container.processEvent(Container.java:1961)
              at java.awt.Component.dispatchEventImpl(Component.java:3931)
              at java.awt.Container.dispatchEventImpl(Container.java:2019)
              at java.awt.Component.dispatchEvent(Component.java:3779)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4203)
              at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4008)
              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3865)
              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3813)
              at java.awt.Container.dispatchEventImpl(Container.java:2005)
              at java.awt.Window.dispatchEventImpl(Window.java:1739)
              at java.awt.Component.dispatchEvent(Component.java:3779)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:231)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


      This happens on Solaris (sun4u/OS 5.9), but not on Win2000.

      Interesting to note that the exception is thrown when tabbedPane.setTabPlacement(JTabbedPane.RIGHT);

      and

      tabbedPane.setTabPlacement(JTabbedPane.BOTTOM);

      only.

            Assignee:
            Daniel Raskin (Inactive)
            Reporter:
            Dina Volodarskaya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: