public ArrayList chooseFile(Component source, boolean fromPerformAction){
    	 File tempFile = fileChooser.getCurrentDirectory();
         fileChooser.setCurrentDirectory(tempFile.getParentFile());
         fileChooser.setCurrentDirectory(tempFile);
         fileChooser.rescanCurrentDirectory();
         fileChooser.setMultiSelectionEnabled(true);
         fileChooser.setDialogTitle("Choose Files Of The Same Type To Test");
         Codec[] codecs = null;
         codecs = OpenAction.makeFilters();

         // Open the dialog.
         int result = fileChooser.showOpenDialog(source);
         if (result != JFileChooser.APPROVE_OPTION)
             return null;
         File[] files = fileChooser.getSelectedFiles();
         
//         Serializable last;   // Local variable is never read, Jinghui commenting it out.
         
         for(int k = 0; k < files.length; k++){
             File file = files[k];        
             if(!file.getAbsolutePath().endsWith(".jff")) { 
                 JOptionPane.showMessageDialog(source, "One of the files does not end in .jff", "Read Error",
                         JOptionPane.ERROR_MESSAGE);
                 return null;
             }
             try {
                 if(k==0) openFile(file, codecs, fromPerformAction);   
                 else openFile(file, codecs, false); 
                
             } catch (ParseException e) {
                 JOptionPane.showMessageDialog(source, e.getMessage(), "Read Error",
                         JOptionPane.ERROR_MESSAGE);
             } catch (DataException e) {
                 JOptionPane.showMessageDialog(source, e.getMessage(), "Data Error",
                         JOptionPane.ERROR_MESSAGE);
             }
         }
         
         if(files == null) return null;
     	
         
         myEnvFrame.getEnvironment().setMultipleObjects(myObjects);
         
         
         return myObjects;
    }