if(jfc.getSelectedFile().getExtension() != "txt"){
System.out.println("Errore!!!");
}


puo' andare?