JFileChooser chooser = new JFileChooser();
// Create a File instance of the file
File file = new File("filename.txt");
// Get the file type name
String fileTypeName = chooser.getTypeDescription(file);
// Text Document
JFileChooser chooser = new JFileChooser();
// Create a File instance of the file
File file = new File("filename.txt");
// Get the file type name
String fileTypeName = chooser.getTypeDescription(file);
// Text Document