Re: File chooser question



int returnVal = chooser.showOpenDialog(parent);
if(returnVal == JFileChooser.APPROVE_OPTION) {
File[] files = chooser.getSelectedFiles() ;
for(int i = 0 ; i < files.length ; i++){
File f = files[i] ;
if(f.isDirectory()){
String[] filenames = f.list() ;
//append to your list
}
else{
//append f to your list
}
}
}

--
Fahd Shariff
http://www.fahdshariff.cjb.net
"Let the code do the talking... "

.