4

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.

Thizzer
  • 16,153
  • 28
  • 98
  • 139

2 Answers2

6

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...

spa
  • 5,059
  • 1
  • 35
  • 59
0

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)

Yossale
  • 14,165
  • 22
  • 82
  • 109