-
Bug
-
Resolution: Fixed
-
P2
-
5.0
-
beta
-
generic, sparc
-
generic, solaris_9
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2120159 | 6 | Konstantin Eremin | P2 | Resolved | Fixed | beta |
JFileChooser in GTK Look and feel throws ArrayIndexOutOfBounds exception when space bar key is pressed on file list panel.
Using keyboard navigation, filelist panel can gain focus. The user can select a folder and go inside the folder by pressing enter key. After that, user can't select any folder - on pressing any of the keys. If the space bar is pressed when the focus is on filelist panel, the following exception can be seen at the console:
Exception occurred during event dispatching:
java.lang.ArrayIndexOutOfBoundsException: 12 >= 7
at java.util.Vector.elementAt(Vector.java:432)
at com.sun.java.swing.plaf.gtk.GTKFileChooserUI$GTKDirectoryListModel.getElementAt(GTKFileChooserUI.java:760)
at javax.swing.JList.getSelectedValue(JList.java:1814)
at com.sun.java.swing.plaf.gtk.GTKFileChooserUI$SelectionListener.valueChanged(GTKFileChooserUI.java:361)
at javax.swing.JList.fireSelectionValueChanged(JList.java:1317)
at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1331)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:187)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:157)
at javax.swing.DefaultListSelectionModel.setValueIsAdjusting(DefaultListSelectionModel.java:619)
at javax.swing.JList.setValueIsAdjusting(JList.java:1671)
at javax.swing.plaf.basic.BasicListUI$Actions.actionPerformed(BasicListUI.java:1690)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1569)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2689)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2724)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2652)
at java.awt.Component.processEvent(Component.java:5240)
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.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1804)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:668)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:916)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:794)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:632)
at java.awt.Component.dispatchEventImpl(Component.java:3817)
at java.awt.Container.dispatchEventImpl(Container.java:2019)
at java.awt.Window.dispatchEventImpl(Window.java:1757)
at java.awt.Component.dispatchEvent(Component.java:3779)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
at java.awt.Dialog+1.run(Dialog.java:514)
at java.awt.Dialog.show(Dialog.java:535)
at javax.swing.JFileChooser.showDialog(JFileChooser.java:717)
at javax.swing.JFileChooser.showOpenDialog(JFileChooser.java:620)
at FileChooserDemo$2.actionPerformed(FileChooserDemo.java:156)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1834)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2152)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5463)
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.processMouseEvent(Container.java:3883)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3813)
at java.awt.Container.dispatchEventImpl(Container.java:2005)
at java.awt.Window.dispatc
The exception occurs on all platforms. I was able to reproduce it on b32 and b51. It does not occur on b09.
Steps to reproduce:
1. In SwingSet2 demo, switch to GTK L&F
2. Go to FileChooser demo and open the filechooser.
3. Using keyboard, bring the focus to filelist panel, select a folder and press enter.
4. Now press the space key. The exception occurs now.
===========================================================
Step three can also be:
3. Double-click on an empty directory.
(More specifically, a directory with fewer children than the index
of the directory in its parent's list).
###@###.### 2004-06-10
Using keyboard navigation, filelist panel can gain focus. The user can select a folder and go inside the folder by pressing enter key. After that, user can't select any folder - on pressing any of the keys. If the space bar is pressed when the focus is on filelist panel, the following exception can be seen at the console:
Exception occurred during event dispatching:
java.lang.ArrayIndexOutOfBoundsException: 12 >= 7
at java.util.Vector.elementAt(Vector.java:432)
at com.sun.java.swing.plaf.gtk.GTKFileChooserUI$GTKDirectoryListModel.getElementAt(GTKFileChooserUI.java:760)
at javax.swing.JList.getSelectedValue(JList.java:1814)
at com.sun.java.swing.plaf.gtk.GTKFileChooserUI$SelectionListener.valueChanged(GTKFileChooserUI.java:361)
at javax.swing.JList.fireSelectionValueChanged(JList.java:1317)
at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1331)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:187)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:157)
at javax.swing.DefaultListSelectionModel.setValueIsAdjusting(DefaultListSelectionModel.java:619)
at javax.swing.JList.setValueIsAdjusting(JList.java:1671)
at javax.swing.plaf.basic.BasicListUI$Actions.actionPerformed(BasicListUI.java:1690)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1569)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2689)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2724)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2652)
at java.awt.Component.processEvent(Component.java:5240)
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.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1804)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:668)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:916)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:794)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:632)
at java.awt.Component.dispatchEventImpl(Component.java:3817)
at java.awt.Container.dispatchEventImpl(Container.java:2019)
at java.awt.Window.dispatchEventImpl(Window.java:1757)
at java.awt.Component.dispatchEvent(Component.java:3779)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
at java.awt.Dialog+1.run(Dialog.java:514)
at java.awt.Dialog.show(Dialog.java:535)
at javax.swing.JFileChooser.showDialog(JFileChooser.java:717)
at javax.swing.JFileChooser.showOpenDialog(JFileChooser.java:620)
at FileChooserDemo$2.actionPerformed(FileChooserDemo.java:156)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1834)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2152)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
at java.awt.Component.processMouseEvent(Component.java:5463)
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.processMouseEvent(Container.java:3883)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3813)
at java.awt.Container.dispatchEventImpl(Container.java:2005)
at java.awt.Window.dispatc
The exception occurs on all platforms. I was able to reproduce it on b32 and b51. It does not occur on b09.
Steps to reproduce:
1. In SwingSet2 demo, switch to GTK L&F
2. Go to FileChooser demo and open the filechooser.
3. Using keyboard, bring the focus to filelist panel, select a folder and press enter.
4. Now press the space key. The exception occurs now.
===========================================================
Step three can also be:
3. Double-click on an empty directory.
(More specifically, a directory with fewer children than the index
of the directory in its parent's list).
###@###.### 2004-06-10
- backported by
-
JDK-2120159 Exception with JFileChooser in GTK LNF
- Resolved
- duplicates
-
JDK-5093154 Not able to select the mounted drive using JFileChooser in GTKLookAndFeel
- Closed
- relates to
-
JDK-5036904 JFileChooser in Motif L&F does not comply with Section 508
- Resolved
-
JDK-5031354 REGRESSION: Reg-test javax/swing/JFileChooser/4150029/bug4150029.java fails
- Closed
-
JDK-4922507 JFileChooser works with keyboard incorrectly sometimes
- Closed