+ JFrame frame;
+ Thread thread;
+ AltosRecordIterable iterable;
+ AltosWriter writer;
+ JFileChooser csv_chooser;
+ JComboBox combo_box;
+
+ static String[] combo_box_items = { "CSV", "KML" };
+
+ void set_default_file() {
+ File current = csv_chooser.getSelectedFile();
+ String current_name = current.getName();
+ String new_name = null;
+ String selected = (String) combo_box.getSelectedItem();
+
+ if (selected.equals("CSV"))
+ new_name = Altos.replace_extension(current_name, ".csv");
+ else if (selected.equals("KML"))
+ new_name = Altos.replace_extension(current_name, ".kml");
+ if (new_name != null)
+ csv_chooser.setSelectedFile(new File(new_name));
+ }