Is it possible to select multiple files using java.awt.FileDialog?
Because I want my dialog to have the OSX finder interface, I can't use JFileChooser.
Is it possible to select multiple files using java.awt.FileDialog?
Because I want my dialog to have the OSX finder interface, I can't use JFileChooser.
According to Javadoc it seems to be possible in JDK7 (see setMultipleMode(boolean)
or getFiles()
which returns an array of files). However cross checking with the Javadoc for JDK6 it is not possible in older versions...
You just need to set the options (default is false)
setMultiSelectionEnabled(true)
http://download.oracle.com/javase/7/docs/api/javax/swing/JFileChooser.html#setMultiSelectionEnabled(boolean)
Here's another question that talks about how to make JFileChooser look correct on OS-X, maybe that will help.
JFileChooser on OS-X