9.11.09

Select a directory with a JFileChooser

reference: http://www.rgagnon.com/javadetails/java-0370.html

chooser = new JFileChooser();
chooser.setCurrentDirectory(new java.io.File("."));
chooser.setDialogTitle(choosertitle);
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

No comments: