import java.io.File;
import javax.swing.*;
import javax.swing.filechooser.*;
/**
* pTitle: 文件过滤器演示/p
* pDescription: FileChooserDemo文件使用的文件过滤器/p
* pCopyright: Copyright (c) 2003/p
* pFilename: MyFilter.java/p
* @version 1.0
*/public class MyFilter extends FileFilter {
private String files;
public boolean accept(File f) {
if (f.isDirectory()) {
return true;
}String extension = getExtension(f);
if (extension != null) {
...[ 查看全文 ]