The Java Developers Almanac 1.4


Order this book from Amazon.

   
Home > List of Packages > javax.swing.filechooser  [19 examples] > Hidden Files  [2 examples]

e896. Showing Hidden Files in a JFileChooser Dialog

By default, hidden files are not shown in a file chooser dialog.
    JFileChooser chooser = new JFileChooser();
    
    // By default, hidingEnabled is true
    boolean hidingEnabled = chooser.isFileHidingEnabled();
    
    // Display hidden files
    chooser.setFileHidingEnabled(false);
    
    // Show the dialog; wait until dialog is closed
    chooser.showOpenDialog(frame);

 Related Examples
e897. Determining If a File Is Hidden

See also: Events    Icons    Layout    Selections   


© 2002 Addison-Wesley.