JFileChooser.showSaveDialog: All files greyed out

前端 未结 3 1464
星月不相逢
星月不相逢 2021-01-18 12:25

I\'m trying to use the JFileChooser to get files for loading and saving. The dialog that comes up with openFileDialog() works fine, but when I use

3条回答
  •  不知归路
    2021-01-18 13:11

    What I ended up doing was to use:

    JFileChooser chooser = new JFileChooser(...);
    chooser.showDialog(myFrame, "Save");
    

    My save dialog looks like a save dialog, and the FileFilter greys out only files that fail its test.

提交回复
热议问题