wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes mulitple file selection using JFileChooser problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "mulitple file selection using JFileChooser problem" Watch "mulitple file selection using JFileChooser problem" New topic
Author

mulitple file selection using JFileChooser problem

seema prakash
Ranch Hand

Joined: Nov 17, 2004
Posts: 59
I have written an ActionListner for a Jbutton to choose mutiple files using JFileChooser and print the file name. I am able to make it work on single file selection , but having problems on multiple selection. Please help.

The code is as given below
Pavan Panduga
Ranch Hand

Joined: Jun 12, 2002
Posts: 68
I think you have to set this property before showing the dialog.
Otherwise, it would already have defaulted while opening the dialog and hence no effect.
fileDialog.setMultiSelectionEnabled(true);
int option = fileDialog.showOpenDialog(null);
seema prakash
Ranch Hand

Joined: Nov 17, 2004
Posts: 59
Thanks a lot Pavan, I got it working now !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mulitple file selection using JFileChooser problem