void handleSelection(String file){
  int index=file.lastIndexOf(java.io.File.separatorChar);
  if (index == -1) {
    savedDir=this.dir;
    savedFile=file;
  }
 else {
    savedDir=file.substring(0,index + 1);
    savedFile=file.substring(index + 1);
  }
  String[] fileNames=fileList.getSelectedItems();
  int filesNumber=(fileNames != null) ? fileNames.length : 0;
  File[] files=new File[filesNumber];
  for (int i=0; i < filesNumber; i++) {
    files[i]=new File(savedDir,fileNames[i]);
  }
  AWTAccessor.FileDialogAccessor fileDialogAccessor=AWTAccessor.getFileDialogAccessor();
  fileDialogAccessor.setDirectory(target,savedDir);
  fileDialogAccessor.setFile(target,savedFile);
  fileDialogAccessor.setFiles(target,files);
}

void handleSelection ( String file ) { int index = file . lastIndexOf ( java . io . File . separatorChar ) ; if ( index == - 1 ) { savedDir = this . dir ; savedFile = file ; } else { savedDir = file . substring ( 0 , index + 1 ) ; savedFile = file . substring ( index + 1 ) ; } String [ ] fileNames = fileList . getSelectedItems ( ) ; int filesNumber = ( fileNames != null ) ? fileNames . length : 0 ; File [ ] files = new File [ filesNumber ] ; for ( int i = 0 ; i < filesNumber ; i ++ ) { files [ i ] = new File ( savedDir , fileNames [ i ] ) ; } AWTAccessor . FileDialogAccessor fileDialogAccessor = AWTAccessor . getFileDialogAccessor ( ) ; fileDialogAccessor . setDirectory ( target , savedDir ) ; fileDialogAccessor . setFile ( target , savedFile ) ; fileDialogAccessor . setFiles ( target , files ) ; }
handle the selection event
