--- jsampler/trunk/src/org/jsampler/view/std/JSAddDbInstrumentsFromFileDlg.java 2007/08/26 09:29:52 1303 +++ jsampler/trunk/src/org/jsampler/view/std/JSAddDbInstrumentsFromFileDlg.java 2007/08/26 14:19:36 1304 @@ -54,6 +54,7 @@ import net.sf.juife.event.TaskListener; import org.jsampler.CC; +import org.jsampler.JSPrefs; import org.jsampler.task.InstrumentsDb; import static org.jsampler.view.std.StdI18n.i18n; @@ -218,14 +219,20 @@ }); } + protected JSPrefs + preferences() { return CC.getViewConfig().preferences(); } + private void onBrowse() { - JFileChooser fc = new JFileChooser(); + String path = preferences().getStringProperty("lastInstrumentLocation"); + JFileChooser fc = new JFileChooser(path); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); int result = fc.showOpenDialog(this); if(result != JFileChooser.APPROVE_OPTION) return; tfSource.setText(fc.getSelectedFile().getPath()); + path = fc.getCurrentDirectory().getAbsolutePath(); + preferences().setStringProperty("lastInstrumentLocation", path); } private void