srcDirTextField.setText(chooser.getSelectedFile().getPath());
File selectedFile = chooser.getSelectedFile(); selectedFile = verifyFileSelection(selectedFile); srcDirTextField.setText(selectedFile.getPath());
    private void browseSrcDirButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseSrcDirButtonActionPerformed	JFileChooser chooser = createFileChooser();	chooser.setFileFilter(archiveAndDirectoryFilter);        chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);	int rc = chooseFile(chooser, "Add source directory or archive");        if (rc == JFileChooser.APPROVE_OPTION) {            srcDirTextField.setText(chooser.getSelectedFile().getPath());            addSourceDirToList();        }    }//GEN-LAST:event_browseSrcDirButtonActionPerformed