Saving with a JFileChooser(使用 JFileChooser 保存)
问题描述
I am using a JFileChooser
and the showSaveDialoge()
and setSelectionMode(JfileChooser.DIRECTORIES_ONLY)
to set where a preselected file will be saved and what it will be called.
I want the user to be able to choose the name the new version, and where to put it. How do I go about this? I also wish to choose a default name.
I hope the codes below implemented inline with your question requirements. The criteria in your question are answered in the code comment. If you need clarification, please let me know.
这篇关于使用 JFileChooser 保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!