本文整理了Java中javax.swing.JFileChooser.getTypeDescription()
方法的一些代码示例,展示了JFileChooser.getTypeDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFileChooser.getTypeDescription()
方法的具体详情如下:
包路径:javax.swing.JFileChooser
类名称:JFileChooser
方法名:getTypeDescription
暂无
代码示例来源:origin: stackoverflow.com
import java.io.*;
import javax.swing.*;
class GetFileType {
public static void main(String[] args){
JFileChooser chooser = new JFileChooser();
File file = new File("Hello.txt");
String fileTypeName = chooser.getTypeDescription(file);
System.out.println("File Type= "+fileTypeName);
}
}
代码示例来源:origin: stackoverflow.com
import javax.swing.*;
import javax.swing.filechooser.*;
import java.io.*;
public class A {
public static void main(String[] args) {
File f = new File("f.jpg");
JFileChooser j = new JFileChooser();
System.out.println(j.getTypeDescription(f));
}
}
代码示例来源:origin: stackoverflow.com
JFileChooser filechooser = new JFileChooser();
File file = new File("your.txt");
System.out.println("the extension type:"+filechooser.getTypeDescription(file));
代码示例来源:origin: omegat-org/omegat
/** Redefines the file type for OmegaT projects. */
public String getTypeDescription(File f) {
if (StaticUtils.isProjectDir(f)) {
return OStrings.getString("PFC_OMEGAT_PROJECT");
} else {
return super.getTypeDescription(f);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!