Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6270998

REGRESSION: Exception in BasicTabbedPaneUI with Mustang build 34 and above.

XMLWordPrintable

    • b46
    • x86
    • windows_2000, windows_xp

      Run the attached jar file "breakMustang.jar" with 1.6 and you will
      get an exception :

      Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException:
       -1
              at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneScrollLayout.layou
      tContainer(BasicTabbedPaneUI.java:2823)
              at java.awt.Container.layout(Container.java:1402)
              at java.awt.Container.doLayout(Container.java:1391)
              at java.awt.Container.validateTree(Container.java:1474)
              at java.awt.Container.validateTree(Container.java:1481)
              at java.awt.Container.validateTree(Container.java:1481)
              at java.awt.Container.validateTree(Container.java:1481)
              at java.awt.Container.validateTree(Container.java:1481)
              at java.awt.Container.validateTree(Container.java:1481)
              at java.awt.Container.validate(Container.java:1449)
              at java.awt.Window.pack(Window.java:502)
              at breakmustang.MainFrame.initComponents(MainFrame.java:59)
              at breakmustang.MainFrame.<init>(MainFrame.java:22)
              at breakmustang.MainFrame$1.run(MainFrame.java:73)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:589)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
      read.java:247)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
      ad.java:168)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:162)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:154)

              at java.awt.EventDispatchThread.run(EventDispatchThread.java:115)
      Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException:
       -1
              at javax.swing.plaf.basic.BasicTabbedPaneUI$TabbedPaneScrollLayout.layou
      tContainer(BasicTabbedPaneUI.java:2823)
              at java.awt.Container.layout(Container.java:1402)
              at java.awt.Container.doLayout(Container.java:1391)
              at java.awt.Container.validateTree(Container.java:1474)
              at java.awt.Container.validateTree(Container.java:1481)
              at java.awt.Container.validateTree(Container.java:1481)
              at java.awt.Container.validateTree(Container.java:1481)
              at java.awt.Container.validateTree(Container.java:1481)
              at java.awt.Container.validateTree(Container.java:1481)
              at java.awt.Container.validate(Container.java:1449)
              at java.awt.Window.dispatchEventImpl(Window.java:1807)
              at java.awt.Component.dispatchEvent(Component.java:4049)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:591)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
      read.java:247)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
      ad.java:168)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:162)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:154)

              at java.awt.EventDispatchThread.run(EventDispatchThread.java:115)


      This does not happen with Tiger. This was submitted by a Peabody user who
      tried the mustang build 34. It seems to be new in this build, although this
      is not certain. Here is the discussion on the Mustang forum
      about this bug :

      http://forums.java.net/jive/thread.jspa?threadID=691&tstart=0


      ###@###.### 2005-05-16 18:45:09 GMT

      Here the small test to reproduce the problem:

      public class MyTest {
        public static void main(String[] args) {
          JFrame frame = new JFrame();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          JTabbedPane pane = new JTabbedPane();
          pane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
          frame.add(pane);
          frame.pack();
          frame.setVisible(true);
        }
      }

      ###@###.### 2005-05-17 15:14:50 GMT

            alexp Alexander Potochkin (Inactive)
            bino Bino George
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: