625 |
JFileChooser fc = new JFileChooser(); |
JFileChooser fc = new JFileChooser(); |
626 |
int result = fc.showOpenDialog(this); |
int result = fc.showOpenDialog(this); |
627 |
if(result == JFileChooser.APPROVE_OPTION) { |
if(result == JFileChooser.APPROVE_OPTION) { |
628 |
tfFilename.setText(toEscapedString(fc.getSelectedFile().getPath())); |
String path = fc.getSelectedFile().getPath(); |
629 |
|
if(java.io.File.separatorChar == '\\') { |
630 |
|
path.replace('\\', '/'); |
631 |
|
} |
632 |
|
tfFilename.setText(toEscapedString(path)); |
633 |
} |
} |
634 |
} |
} |
635 |
} |
} |