【发布时间】:2012-12-22 12:38:35
【问题描述】:
可能重复:
JFileChooser.showSaveDialog(…) - how to set suggested file name
我已经看到这个问题被问了几次,但没有一个答案对我有任何帮助。我希望保存对话框使用 JFileChooser 建议类似“myFile.txt”的文件名。
这是我所拥有的:
JFileChooser jFileChooser = new JFileChooser();
jFileChooser.setCurrentDirectory(new File("C:\\"));
jFileChooser.showSaveDialog(null);
【问题讨论】:
-
抱歉,从来没有遇到过这些。我什至在输入此内容时浏览了这些建议。
标签: java swing filenames jfilechooser savefiledialog