Java Swing Tutorial - Java JFileChooser .setFileHidingEnabled (boolean b)








Syntax

JFileChooser.setFileHidingEnabled(boolean b) has the following syntax.

public void setFileHidingEnabled(boolean b)

Example

In the following code shows how to use JFileChooser.setFileHidingEnabled(boolean b) method.

 /*w  ww  .  java2 s  .c o  m*/
import javax.swing.JFileChooser;

public class Main {
  public static void main(String[] argv) {
    JFileChooser chooser = new JFileChooser();
    boolean hidingEnabled = chooser.isFileHidingEnabled();
    chooser.setFileHidingEnabled(false);
    chooser.showOpenDialog(null);
  }
}