471 |
String s = preferences().getStringProperty("lastInstrumentLocation"); |
String s = preferences().getStringProperty("lastInstrumentLocation"); |
472 |
JFileChooser fc = new JFileChooser(s); |
JFileChooser fc = new JFileChooser(s); |
473 |
int result = fc.showOpenDialog(this); |
int result = fc.showOpenDialog(this); |
474 |
if(result == JFileChooser.APPROVE_OPTION) { |
if(result != JFileChooser.APPROVE_OPTION) return; |
475 |
cbFilename.setSelectedItem(toEscapedString(fc.getSelectedFile().getPath())); |
|
476 |
btnOk.requestFocusInWindow(); |
String path = fc.getSelectedFile().getAbsolutePath(); |
477 |
|
if(java.io.File.separatorChar == '\\') { |
478 |
String path = fc.getCurrentDirectory().getAbsolutePath(); |
path.replace('\\', '/'); |
|
preferences().setStringProperty("lastInstrumentLocation", path); |
|
479 |
} |
} |
480 |
|
cbFilename.setSelectedItem(toEscapedString(path)); |
481 |
|
btnOk.requestFocusInWindow(); |
482 |
|
|
483 |
|
path = fc.getCurrentDirectory().getAbsolutePath(); |
484 |
|
preferences().setStringProperty("lastInstrumentLocation", path); |
485 |
} |
} |
486 |
|
|
487 |
private void |
private void |