This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
Make sure you make directories selectable in JFileChooser by calling setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY ), and setting an appropriate FileFilter (one that only returns true if file.isDirectory() ) using setFileFilter( FileFilter ).
Once you get a selection back from the JFileChooser, you can call file.list() to get a String array of file names, or file.listFiles() to get a File array.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.