Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mulitple file selection using JFileChooser problem

 
seema prakash
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Pavan, I got it working now !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic