-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.2.0
-
sparc
-
solaris_2.6
The FileChooserDemo in swing1.1beta throws exceptions changing to Motif look and feel on Windows NT and Solaris when using JDK1.1.6.
Steps to Reproduce:
0) Setup up so that you're using swing1.1beta and JDK1.1.6.
1) Launch the FileChooserDemo example by typing "runnit".
2) Click on the Motif button.
RESULT: The app switches to Motif and the following exeptions are thrown (Solaris):
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: setSelectedIndex: 0 out of bounds
at com.sun.java.swing.JComboBox.setSelectedIndex(JComboBox.java:397)
at com.sun.java.swing.plaf.basic.BasicComboPopup$PropertyChangeHandler.propertyChange(BasicComboPopup.java:556)
at com.sun.java.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:151)
at com.sun.java.swing.JComponent.firePropertyChange(JComponent.java:2751)
at com.sun.java.swing.JComboBox.setModel(JComboBox.java:186)
at com.sun.java.swing.plaf.motif.MotifFileChooserUI.installComponents(MotifFileChooserUI.java:224)
at com.sun.java.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:100)
at com.sun.java.swing.plaf.motif.MotifFileChooserUI.installUI(MotifFileChooserUI.java:161)
at com.sun.java.swing.JComponent.setUI(JComponent.java:249)
at com.sun.java.swing.JFileChooser.updateUI(JFileChooser.java:1158)
at com.sun.java.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:863)
at com.sun.java.swing.SwingUtilities.updateComponentTreeUI(SwingUtilities.java:855)
at FileChooserDemo$OptionListener.actionPerformed(FileChooserDemo.java:326)
at com.sun.java.swing.AbstractButton.fireActionPerformed(AbstractButton.java:939)
at com.sun.java.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:974)
at com.sun.java.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at com.sun.java.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:251)
at com.sun.java.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:195)
at java.awt.Component.processMouseEvent(Component.java:2404)
at java.awt.Component.processEvent(Component.java:2249)
at java.awt.Container.processEvent(Container.java:878)
at java.awt.Component.dispatchEventImpl(Component.java:1781)
at java.awt.Container.dispatchEventImpl(Container.java:923)
at java.awt.Component.dispatchEvent(Component.java:1708)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:1559)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:1463)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1395)
at java.awt.Container.dispatchEventImpl(Container.java:910)
at java.awt.Window.dispatchEventImpl(Window.java:492)
at java.awt.Component.dispatchEvent(Component.java:1708)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:81)
Steps to Reproduce:
0) Setup up so that you're using swing1.1beta and JDK1.1.6.
1) Launch the FileChooserDemo example by typing "runnit".
2) Click on the Motif button.
RESULT: The app switches to Motif and the following exeptions are thrown (Solaris):
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: setSelectedIndex: 0 out of bounds
at com.sun.java.swing.JComboBox.setSelectedIndex(JComboBox.java:397)
at com.sun.java.swing.plaf.basic.BasicComboPopup$PropertyChangeHandler.propertyChange(BasicComboPopup.java:556)
at com.sun.java.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:151)
at com.sun.java.swing.JComponent.firePropertyChange(JComponent.java:2751)
at com.sun.java.swing.JComboBox.setModel(JComboBox.java:186)
at com.sun.java.swing.plaf.motif.MotifFileChooserUI.installComponents(MotifFileChooserUI.java:224)
at com.sun.java.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:100)
at com.sun.java.swing.plaf.motif.MotifFileChooserUI.installUI(MotifFileChooserUI.java:161)
at com.sun.java.swing.JComponent.setUI(JComponent.java:249)
at com.sun.java.swing.JFileChooser.updateUI(JFileChooser.java:1158)
at com.sun.java.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:863)
at com.sun.java.swing.SwingUtilities.updateComponentTreeUI(SwingUtilities.java:855)
at FileChooserDemo$OptionListener.actionPerformed(FileChooserDemo.java:326)
at com.sun.java.swing.AbstractButton.fireActionPerformed(AbstractButton.java:939)
at com.sun.java.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:974)
at com.sun.java.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at com.sun.java.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:251)
at com.sun.java.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:195)
at java.awt.Component.processMouseEvent(Component.java:2404)
at java.awt.Component.processEvent(Component.java:2249)
at java.awt.Container.processEvent(Container.java:878)
at java.awt.Component.dispatchEventImpl(Component.java:1781)
at java.awt.Container.dispatchEventImpl(Container.java:923)
at java.awt.Component.dispatchEvent(Component.java:1708)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:1559)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:1463)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1395)
at java.awt.Container.dispatchEventImpl(Container.java:910)
at java.awt.Window.dispatchEventImpl(Window.java:492)
at java.awt.Component.dispatchEvent(Component.java:1708)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:81)
- duplicates
-
JDK-4150466 JComboBox.setModel() on empty JComboBox causes IllegalArgumentException
- Resolved