开发者

How to make Java JFileChooser display all files including ones starting with a dot

开发者 https://www.devze.com 2023-03-23 02:46 出处:网络
By default JFileChooser does not display files with names starting with at dot. How开发者_如何学Go to make it display all files?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消