How to make Java JFileChooser display all files including ones starting with a dot
By default JFileChooser
does not display files with names starting with at dot. How开发者_如何学Go to make it display all files?
Here is what I have tried (did not help):
JFileChooser chooser = new JFileChooser();
chooser.setFileFilter(new FileFilter() {
@Override
public boolean accept(File f) {
return true;
}
@Override
public String getDescription() {
return "All Files";
}
});
Thanks.
JFilechooser setFileHidingEnabled()
chooser.setFileHidingEnabled(false);
How to Use File Chooser
精彩评论