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.

2 Answers 2

7

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

Sign up to request clarification or add additional context in comments.

3 Comments

Too bad OSX doesn't support JDK7 -.-
@MrThys: Since Java7's not out yet, that's not surprising.
Still for Linux and Windows there are snapshot binaries download.java.net/jdk7
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)

2 Comments

I quote myself; "Because I want my dialog to have the OSX finder interface, I can't use JFileChooser."
@MrThys sorry , was too quick to answer. brb

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.