EVALUATION
this is a bug in JFileChooser. the attached testcase can be used to reproduce the same problem using a simple java application.
on solaris running gnome, with tiger b57:
java test
this will pop up jfilechooser dialog, in GTK look and feel. select any folder displayed and double click it, you will see the selection displayed, and then hit select button.
getSelectedFile() will return incorrect information, for example if the path you double click is /aaa/bbb (meaning you double click on bbb, and current dir is aaa), it will return /aaa/bbb/bbb.
single-click on bbb works.
now run the same test case with
java test useMotif
it will pop up JFileCHooser in metal look and feel.
run the same testcase, everthing works as expected. it will return /aaa/bbb when double click on bbb, and then hit select button.
re-assigning to swing for further evaluation.
###@###.### 2004-07-14
=======================================
This is reproducible with FileChooserDemo in both Motif and GTK L&F. This
is not a regression in 1.5 and will be addressed in the next release.
###@###.### 2004-07-15
The fix is to show the current directory path in absolute form just like in
Windows and Metal L&F. This would also be consistent with the multiple directory
selection mode on the same L&F (GTK and Motif).
|