我希望用户使用aJFileChooser
选择应在哪个文件夹中生成某个文件。但是,我不希望用户选择文件,而只选择文件夹。
我将如何继续这样做?
最佳答案
您将使用setFileSelectionMode() :
Sets the JFileChooser to allow the user to just select files, just select directories, or select both files and directories. The default is JFilesChooser.FILES_ONLY.
关于java - 使用 JFileChooser 选择文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23004882/