Re: File chooser question
- From: "Fahd Shariff" <fahdshariff@xxxxxxxxx>
- Date: 27 Jun 2005 07:42:44 -0700
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... "
.
- References:
- File chooser question
- From: aeh
- File chooser question
- Prev by Date: Re: remove redundency in list of pairs
- Next by Date: Re: How to handle exceptions in constructor?
- Previous by thread: Re: File chooser question
- Next by thread: What's the recommended way to embed (c), version, TM, etc in a class file?
- Index(es):