I feel like there should be a simple way to do this but I can\'t figure it out. I have a JFileChooser that allows the user to select directories. I want to show all the file
Keep the fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY) and use:
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY)
File[] selectedFiles = fileChooser.getSelectedFile().listFiles();