When adding JAR files to the classpath of a project the dropbox in the file dialog only shows 'Desktop' and no other
information about the current path location. If the 'up directory' button is pressed then the dropbox correctly updates
and shows the current hierarchy.
This problem does NOT occur on other file dialogs, such as Open Project.
As far as I can tell this bug got introduced in one of the later version 6 releases, possibly RC1.
The behavior is strange : FileChooser that is opened on button pressing
doesn't want to show full ancestors path in combobox.
But it recognizes correctly the current directory itself and its content.
The problem somewhere around setCurrentDirectory() method.
Skipping of this method call leads to setup user home directory with
correct ancestors path in combobox. But setting current directory
with method mentioned above leads to bad values in combobox.
This problem concerns plain Java JFileChooser also , so it seems
there is some registered services that influence on such behavior.
Ok , catch it .
The problem is in swing FileChooserUI implementation:
This is JDK bug.
Mentioned JFileChooser uses this UI class for rendering
It differs from other FileChoosers ( f.e. Open Project chooser )
which is implemented in generic way inside NB and doesn't have such problem.
*** This issue has been marked as a duplicate of 122577 ***