I'm trying to use a FileDialog to allow a user to choose a specific directory instead of a file. How do I make the dialog allow a directory to be chosen and return the name of the directory (so I can use it as a File object) instead of simply opening the directory and listing its contents? I've tried creating a new FilenameFilter and passing it to the FileDialog using setFilenameFilter, but it didn't work.
Do I need to go about this some other way?
I'm using Java 1.1 on Win95.