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
Override the approveSelection() method. Something like:
JFileChooser chooser = new JFileChooser( new File(".") ) { public void approveSelection() { if (getSelectedFile().isFile()) { // beep return; } else super.approveSelection(); } };