File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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 !
 
Consider Paul's rocket mass heater.
 
subject: mulitple file selection using JFileChooser problem
 
Similar Threads
Finding Folders
problem in attached file .
need to run threads with different parameters
adding a save method
HELP!! Trying to read a file In the dir. I have changed to.