Java JFileChooser .isDirectorySelectionEnabled ()
Syntax
JFileChooser.isDirectorySelectionEnabled() has the following syntax.
public boolean isDirectorySelectionEnabled()
Example
In the following code shows how to use JFileChooser.isDirectorySelectionEnabled() method.
// ww w . j a v a 2 s . c o m
import javax.swing.JFileChooser;
public class Main {
public static void main(String[] argv) {
JFileChooser chooser = new JFileChooser();
boolean enabled = chooser.isDirectorySelectionEnabled();
chooser.showOpenDialog(null);
}
}
Home »
Java Tutorial »
javax.swing »
Java Tutorial »
javax.swing »