java - Using FileDialog on MacOS X instead of JFileChooser for file AND directory -


here's problem. have java application runs on macos x. right i'm trying make application available on mac app store. unfortunately, apple reject application because i'm not using native filedialog access files , directories. in cases user has select files in other has select directories. here's i've tried create directory chooser:

// go in directory chooser mode system.setproperty("apple.awt.filedialogfordirectories", "true"); filedialog dialog = new filedialog(tamaggoapp.getframe()); dialog.setdirectory(defaultdir); dialog.setvisible(true);  // set property file chooser. system.setproperty("apple.awt.filedialogfordirectories", "false"); 

unfortunately, doesn't work me. seems property has set in main() method can't toggle between file , directory choose. using swing jfilechooser not option since apple reject (i tried).

i figured out working time jdk1.7u21. problem can select directory still can choose files also. have find way avoid doesn't seem easy when in forums.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -