How can I enforce the JFileChooser filetype (when saving). I have implemented a file filter (CSV filetype) but it does not in any way enforce the file extension on the user.
I need the file chooser to append the file extension to the filename if the user has not done so. I am guessing that it would be possible to check fileChooser.getSelectedFile() for the file extension after the user has selected the file, but this may cause overwriting an existing file.