我已经看到过这个问题被问了几次,但没有任何答案对我有帮助。我想让保存对话框使用JFileChooser建议一个文件名,比如"myFile.txt"。
这是我的代码:
JFileChooser jFileChooser = new JFileChooser();
jFileChooser.setCurrentDirectory(new File("C:\\"));
jFileChooser.showSaveDialog(null);
我已经看到过这个问题被问了几次,但没有任何答案对我有帮助。我想让保存对话框使用JFileChooser建议一个文件名,比如"myFile.txt"。
这是我的代码:
JFileChooser jFileChooser = new JFileChooser();
jFileChooser.setCurrentDirectory(new File("C:\\"));
jFileChooser.showSaveDialog(null);