从JDK 1.3.1 API DOC 摘下来的 好像意思是说有些地方是不好用,不过我昨天刚写了一段代码是把文件下符合条件的文件删除,用的是File.listFiles(FilenameFilter) 还是可以用的 我的OS 是 XPSets the filename filter for this file dialog window to the specified filter. Filename filters do not function in Sun's reference implementation for Windows 95, 98, or NT 4.0. Parameters: filter - the specified filter. See Also: FilenameFilter, getFilenameFilter()
好像意思是说有些地方是不好用,不过我昨天刚写了一段代码是把文件下符合条件的文件删除,用的是File.listFiles(FilenameFilter) 还是可以用的
我的OS 是 XPSets the filename filter for this file dialog window to the specified filter. Filename filters do not function in Sun's reference implementation for Windows 95, 98, or NT 4.0.
Parameters:
filter - the specified filter.
See Also:
FilenameFilter, getFilenameFilter()
如果是JFileChooser就用
JFileChooser.addChoosableFileFilter(FileFilter filter)
JFileChooser.setAcceptAllFileFilterUsed(false);