50,504
社区成员
发帖
与我相关
我的任务
分享
JFileChooser jfChooser = new JFileChooser("D:\\..\\..");
jfChooser.setFileFilter(new FileFilter() {
@Override
public boolean accept(File f){
if(f.getName().endsWith("txt") || f.isDirectory())
return true;
return false;
}
@Override
public String getDescription(){
// TODO Auto-generated method stub
return "文本数据(*.txt)";
}
});