Java Swing Tutorial - Java JFileChooser .isTraversable (File f)








Syntax

JFileChooser.isTraversable(File f) has the following syntax.

public boolean isTraversable(File f)

Example

In the following code shows how to use JFileChooser.isTraversable(File f) method.

//  w ww. j  av  a  2s  .com

import java.io.File;

import javax.swing.JFileChooser;

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

    chooser.showOpenDialog(null);
  }
}