src/main/java/eu/digitisation/input/FileSelector.java
private File choose(String defaultName) {
        JFileChooser chooser = new JFileChooser();

        chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
        chooser.setDialogTitle("Select input file");
        chooser.setCurrentDirectory(dir);
        chooser.setSelectedFile(new File(defaultName));
        int returnVal = chooser.showOpenDialog(FileSelector.this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            return chooser.getSelectedFile();
        } else {
            return null;
        }
    }
/**
     * Select file with a file selector (menu)
     *
     * @param defaultName the default name for the chosen file
     * @return
     */
Select file with a file selector (menu)
@param defaultName the default name for the chosen file
@return
Select file with a file selector ( menu ) @param defaultName the default name for the chosen file @return
private File choose(String defaultName) {
        JFileChooser chooser = new JFileChooser();
        chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
        chooser.setDialogTitle("Select input file");
        chooser.setCurrentDirectory(dir);
        chooser.setSelectedFile(new File(defaultName));
        int returnVal = chooser.showOpenDialog(FileSelector.this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            return chooser.getSelectedFile();
        } else {
            return null;
        }
    }
private File choose ( String defaultName ) { JFileChooser chooser = new JFileChooser ( ) ; chooser . setFileSelectionMode ( JFileChooser . FILES_AND_DIRECTORIES ) ; chooser . setDialogTitle ( "Select input file" ) ; chooser . setCurrentDirectory ( dir ) ; chooser . setSelectedFile ( new File ( defaultName ) ) ; int returnVal = chooser . showOpenDialog ( FileSelector . this ) ; if ( returnVal == JFileChooser . APPROVE_OPTION ) { return chooser . getSelectedFile ( ) ; } else { return null ; } }
Select file with a file selector (menu)
 @param defaultName the default name for the chosen file
 @return
Select file with a file selector ( menu ) @param defaultName the default name for the chosen file @return