altosui: set default .csv file name in file save dialog
authorKeith Packard <keithp@keithp.com>
Sat, 11 Sep 2010 03:55:05 +0000 (20:55 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 11 Sep 2010 03:55:59 +0000 (20:55 -0700)
This uses setSelectedFile to specify which output filename to make the
default in the save dialog.

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/altosui/AltosCSVUI.java

index 2d81236..643d411 100644 (file)
@@ -56,6 +56,7 @@ public class AltosCSVUI
                        path = path.substring(0,dot);
                path = path.concat(".csv");
                csv_chooser = new JFileChooser(path);
+               csv_chooser.setSelectedFile(new File(path));
                int ret = csv_chooser.showSaveDialog(frame);
                if (ret == JFileChooser.APPROVE_OPTION) {
                        try {