我通过阅读
System.setProperty("apple.awt.fileDialogForDirectories", "true");
用户可以通过 a 选择目录FileDialog
,现在FileDialog
唤起本机文件选择器,这正是我想要的,但在上面的行中显示:apple.awt...
,这是否意味着此选项仅适用于 Mac OSX?
if(no) {
great
} else {
what can i do to implement this on other operating systems than?
}
谢谢你的帮助!
PS:我知道很多人建议使用 JFileChooser,但在这种情况下,我更喜欢 FileDialog,除非那是不可能的