I have a requirement where a user browse through JFileChooser
and selects a folder.
But while doing this selection the user should not be allowed to select root drive. By "Root Drive" I mean C:
or D:
etc. in Windows and /
in UNIX/Linux.
I think here I can not use filters for JFileChooser
as its job is to browse through the files and hence it does not make any sense to filter the drive itself.
Please suggest a proper solution which may work on all Windows/Linux file System.