R
RC
I only let user select the directories,
not let user select the files.
So I
myFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
That is fine, but user complain about that, they want to
make sure there are files under the directory.
If I do
myFileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
Then user will mistake select a file, which I don't let them select a
file. I need to popup a dialog says "Please select a directory only".
The idea thing is I can gray out the file names, so user can see
there are files under a directory, but they can't select any file,
only can select a directory.
Anyone out there has any idea how to gray out the file names in
JFileChooser?
Thank Q!
not let user select the files.
So I
myFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
That is fine, but user complain about that, they want to
make sure there are files under the directory.
If I do
myFileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
Then user will mistake select a file, which I don't let them select a
file. I need to popup a dialog says "Please select a directory only".
The idea thing is I can gray out the file names, so user can see
there are files under a directory, but they can't select any file,
only can select a directory.
Anyone out there has any idea how to gray out the file names in
JFileChooser?
Thank Q!