-
Bug
-
Resolution: Fixed
-
P3
-
6
-
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
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
- duplicates
-
JDK-6290044 REGRESSION:ArrayIndexOutOfBoundsException exception throws
- Closed
-
JDK-6279417 REGRESSION: JTabbedPane with zero tabs and SCROLL_TAB_LAYOUT throwing exception
- Closed
-
JDK-6281083 REGRESSION with BasicTabbedPaneUI ArrayIndexOutOfBoundsException
- Closed
-
JDK-6303016 REGRESSION: Layout exception with JTabbedPane with no tabs
- Closed
-
JDK-6303011 Layout exception with JTabbedPane with no tabs
- Closed
- relates to
-
JDK-5076755 JTabbedPane setSelectedIndex(-1) doesn't work properly with Scroll Layout
- Resolved
(1 relates to)