这样写就正常了
JFileChooser jfc=new JFileChooser();
jfc.showOpenDialog(null);
File selectedFile = jfc.getSelectedFile();
if(selectedFile!=null){
String file=selectedFile.getAbsolutePath();
System.out.println(file);
}
这样写就正常了
JFileChooser jfc=new JFileChooser();
jfc.showOpenDialog(null);
File selectedFile = jfc.getSelectedFile();
if(selectedFile!=null){
String file=selectedFile.getAbsolutePath();
System.out.println(file);
}