JDK-6492962 : JFileChooser on Vista: "User" directory not shown properly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2006-11-13
  • Updated: 2011-02-16
  • Resolved: 2007-03-16
Related Reports
Duplicate :  
Description
Original description follows this update.

Content of user folders not shown correctly when browsed from desktop.

- Using Windows Explorer, browse to c:\users\<username>
- Create a few files and folders.
- Open JFileChooser
- From the desktop, select <username>
- Notice that none of the folders or files you created are there. (just defaults)

This also results in the following observed behavior:

Original description:
-----------------------------
New Folder created inside "User" directory in Vista is not visible in metal,windowsL&F FileChooserUI
Open FilChooserDemo in Metal/Windows L&F.

1)Double Click to traverser into the "User" directory. 
2)Click on the "Create a New Folder" Icon. 
Expected behavior :
1)A new Folder is created 
2)The New Folder appears in the JFileChooser UI with the File name in editable mode.
Actual behavior:
1)New Folder is created 
2)The New Folder DOES NOT appear in the JFileChooser UI.
Open the folder in the native  windows explorer and you can see that the fle is created.

Try repeating the above and the same result is seen.
This behavior is seen only when you double click on the user directory from the desktop. 
If you traverse to directory through the full path, i.e., c:\Users\user then the New Folder is visible.

Reproduced on mustang b105 pit build, Vista 5840.

Comments
EVALUATION Most likely this is a problem of incorrect usage of COM in ShellFolder2.cpp.
20-11-2006