Java JFileChooser .isFileSelectionEnabled ()

Syntax

JFileChooser.isFileSelectionEnabled() has the following syntax.

public boolean isFileSelectionEnabled()

Example

In the following code shows how to use JFileChooser.isFileSelectionEnabled() method.


/*  w w  w.  j a v a2 s.  com*/
import javax.swing.JFileChooser;

public class Main {
  public static void main(String[] argv) {
    JFileChooser chooser = new JFileChooser();
    boolean enabled = chooser.isFileSelectionEnabled();

    chooser.showOpenDialog(null);
  }
}