I need to display the file name without the extension in JFileChooser(open mode). How?
问题 I use 'JFileChooser' in open mode. I need to display the 'file name' field without the extension. How?? I know the FileView. It remove extensions in file system's files, but it leaves the expansion in selected file in the field 'File name' explanation This is my FileView code: public class JQSFileView extends FileView{ @Override public String getName(File file){ return FilenameUtils.removeExtension(file.getName()); } } I use this: fc.addPropertyChangeListener(JFileChooser.SELECTED_FILE