Ho开发者_如何学Pythonw filter the files by extensions (in the screen), like this example
thanks, celso.
You can use FileNameExtensionFilter
to filter certain file extension in JFileChooser
. The API doc for it gives a short example:
FileFilter filter = new FileNameExtensionFilter("JPEG file", "jpg", "jpeg");
JFileChooser fileChooser = new JFileChooser();
fileChooser.addChoosableFileFilter(filter);
精彩评论