File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Select directory dialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Select directory dialog" Watch "Select directory dialog" New topic

Select directory dialog

Manuel Corrales

Joined: Dec 09, 2004
Posts: 2
I know there is an Open or Save dialog.

Is there a way of get a dialog for selecting a directory??
Pat Hays
Ranch Hand

Joined: Aug 20, 2004
Posts: 138
Hi Manuel

Try this code,
fileChooser.setCurrentDirectory(new File("C:\\tools"));

Download Java GUI Builder, <a href="" target="_blank" rel="nofollow"></a>
wood burning stoves
subject: Select directory dialog