United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6493542 JFileChooser throws NPE on Vista with Win LaF in new folder
JDK-6493542 : JFileChooser throws NPE on Vista with Win LaF in new folder

Details
Type:
Bug
Submit Date:
2006-11-14
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
client-libs
OS:
windows_vista,windows_2008,windows_xp
Sub-Component:
javax.swing
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6,6u16
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Duplicate:

Sub Tasks

Description
This issue was detected by PIT made for 6.0b105.

This is reproduced on Windows Vista and with Windows LookAndFeel only. Steps to reproduce:

1. Start FileChooserDemo with WinLaF
2. Open JFileChooser
3. Navigate to a folder where creation of new folders is allowed
4. Click "New Folder" - a new one appears. Give it a name and press Enter
5. Enter the newly created directory by pressing Enter
6. Click Cancel.

A NPE thrown:

java.lang.NullPointerException
        at javax.swing.JComponent.repaint(JComponent.java:4728)
        at sun.swing.FilePane$2.repaintListSelection(FilePane.java:114)
        at sun.swing.FilePane$2.repaintSelection(FilePane.java:104)
        at sun.swing.FilePane$2.focusLost(FilePane.java:99)
        at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:213)
        at java.awt.Component.processFocusEvent(Component.java:5930)
        at java.awt.Component.processEvent(Component.java:5794)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Component.dispatchEventImpl(Component.java:4410)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
        at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:878)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:551)
        at java.awt.Component.dispatchEventImpl(Component.java:4282)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)
        at java.awt.Dialog$1.run(Dialog.java:1039)
        at java.awt.Dialog$3.run(Dialog.java:1091)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Dialog.show(Dialog.java:1089)
        at javax.swing.JFileChooser.showDialog(JFileChooser.java:722)
        at javax.swing.JFileChooser.showOpenDialog(JFileChooser.java:625)
        at FileChooserDemo$2.actionPerformed(FileChooserDemo.java:160)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6038)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
        at java.awt.Component.processEvent(Component.java:5803)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Component.dispatchEventImpl(Component.java:4410)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
        at java.awt.Container.dispatchEventImpl(Container.java:2102)
        at java.awt.Window.dispatchEventImpl(Window.java:2429)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

                                    

Comments
EVALUATION

Event processing on dialog closing should be refined
                                     
2006-11-20



Hardware and Software, Engineered to Work Together