(+84) 236.3827111 ex. 402

Hiển thị đường dẫn đến thư mục khi thực hiện sự kiện Đọc File trong GUI - Java


//Hiển thị đường dẫn đến thư mục chứa file
JFileChooser jfc = new JFileChooser();
jfc.showOpenDialog(null);
String duongDan = jfc.getSelectedFile().getPath();
JOptionPane.showMessageDialog(null,duongDan);
DS.docFile(duongDan);