I need to know how to get the "browse for folder" dialog in java. I am aware of SWT. But I need to do in swing? Is there any solution to this?
[As we start on eclipse it will ask for choose workspace. We can see the browse for folder dialog at that time] Thanks in advance.
You can force JFileChooser to select only folders, if you add the following command.
_fileChooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY);
in the snippet that Bibhaw posted.