Đọc file trong GUI - Java
JFileChooser fc = new JFileChooser();
fc.showOpenDialog(null);
String tenFile = fc.getSelectedFile().getPath();
try{
File f = new File(tenFile);
if(f.exists()){
// đọc file ở đây
}else System.out.println(" Khong ton tai file");
}catch(Exception e){
System.out.println(e.getMessage());
}