简体   繁体   中英

Java FileSystemView Hidden Folder

I have an applet for uploading file, and when browse file, it showed all folder normally just like normal except it does not show hidden folder. My question is, is it possible to show hidden folder also in the file browser?

I am using java 1.6 and javax.swing.filechooser

Hiding files in Swing JFileChooser :

JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileHidingEnabled(false);
fileChooser.showOpenDialog(null);

Setting false to the method setFileHidingEnabled() of JFileChooser lets hidden files be shown. see : http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html

Check setFileHidingEnabled method of JFileChooser.

This method

Sets file hiding on or off. If true, hidden files are not shown in the file chooser. The job of determining which files are shown is done by the FileView.

fileChooser.setFileHidingEnabled(false);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM