JFileChooser fileChooser = new JFileChooser(file); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
Related examples
Adding a Filter to a File Chooser Dialog
Copying the Filename Path from a JFileChooser Dialog to the Clipboard
Creating a JFileChooser Dialog
Determining If the Approve or Cancel Button Was Clicked in a JFileChooser Dialog
Getting and Setting the Current Directory of a JFileChooser Dialog
Getting and Setting the Selected File of a JFileChooser Dialog
Getting the File-Type Name of a File
http://www.exampledepot.com/egs/javax.swing.filechooser/DirOnly.html
No comments:
Post a Comment