Index: trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java	(revision 7578)
@@ -7,5 +7,6 @@
 import javax.swing.filechooser.FileFilter;
 
-import org.openstreetmap.josm.gui.widgets.JFileChooserManager;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
+import org.openstreetmap.josm.gui.widgets.FileChooserManager;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -46,30 +47,30 @@
 
     /**
-     * Creates a new {@link JFileChooser} and makes it visible.
+     * Creates a new {@link AbstractFileChooser} and makes it visible.
      * @param open If true, pops up an "Open File" dialog. If false, pops up a "Save File" dialog
      * @param multiple If true, makes the dialog allow multiple file selections
      * @param title The string that goes in the dialog window's title bar
-     * @return The {@code JFileChooser}.
+     * @return The {@code AbstractFileChooser}.
      * @since 1646
      */
-    public static JFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title) {
+    public static AbstractFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title) {
         return createAndOpenFileChooser(open, multiple, title, null);
     }
 
     /**
-     * Creates a new {@link JFileChooser} and makes it visible.
+     * Creates a new {@link AbstractFileChooser} and makes it visible.
      * @param open If true, pops up an "Open File" dialog. If false, pops up a "Save File" dialog
      * @param multiple If true, makes the dialog allow multiple file selections
      * @param title The string that goes in the dialog window's title bar
      * @param extension The file extension that will be selected as the default file filter
-     * @return The {@code JFileChooser}.
+     * @return The {@code AbstractFileChooser}.
      * @since 2020
      */
-    public static JFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title, String extension) {
+    public static AbstractFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title, String extension) {
         return createAndOpenFileChooser(open, multiple, title, extension, JFileChooser.FILES_ONLY, true, null);
     }
 
     /**
-     * Creates a new {@link JFileChooser} and makes it visible.
+     * Creates a new {@link AbstractFileChooser} and makes it visible.
      * @param open If true, pops up an "Open File" dialog. If false, pops up a "Save File" dialog
      * @param multiple If true, makes the dialog allow multiple file selections
@@ -82,15 +83,15 @@
      * @param allTypes If true, all the files types known by JOSM will be proposed in the "file type" combobox.
      *                 If false, only the file filters that include {@code extension} will be proposed
-     * @param lastDirProperty The name of the property used to setup the JFileChooser initial directory.
+     * @param lastDirProperty The name of the property used to setup the AbstractFileChooser initial directory.
      *        This property will then be updated to the new "last directory" chosen by the user. If null, the default property "lastDirectory" will be used.
-     * @return The {@code JFileChooser}.
+     * @return The {@code AbstractFileChooser}.
      * @since 5438
      */
-    public static JFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title, String extension, int selectionMode, boolean allTypes, String lastDirProperty) {
-        return new JFileChooserManager(open, lastDirProperty).createFileChooser(multiple, title, extension, allTypes, selectionMode).openFileChooser();
+    public static AbstractFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title, String extension, int selectionMode, boolean allTypes, String lastDirProperty) {
+        return new FileChooserManager(open, lastDirProperty).createFileChooser(multiple, title, extension, allTypes, selectionMode).openFileChooser();
     }
 
     /**
-     * Creates a new {@link JFileChooser} for a single {@link FileFilter} and makes it visible.
+     * Creates a new {@link AbstractFileChooser} for a single {@link FileFilter} and makes it visible.
      * @param open If true, pops up an "Open File" dialog. If false, pops up a "Save File" dialog
      * @param multiple If true, makes the dialog allow multiple file selections
@@ -101,14 +102,14 @@
      *                      <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li>
      *                      <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul>
-     * @param lastDirProperty The name of the property used to setup the JFileChooser initial directory. This property will then be updated to the new "last directory" chosen by the user
-     * @return The {@code JFileChooser}.
+     * @param lastDirProperty The name of the property used to setup the AbstractFileChooser initial directory. This property will then be updated to the new "last directory" chosen by the user
+     * @return The {@code AbstractFileChooser}.
      * @since 5438
      */
-    public static JFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title, FileFilter filter, int selectionMode, String lastDirProperty) {
-        return new JFileChooserManager(open, lastDirProperty).createFileChooser(multiple, title, filter, selectionMode).openFileChooser();
+    public static AbstractFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title, FileFilter filter, int selectionMode, String lastDirProperty) {
+        return new FileChooserManager(open, lastDirProperty).createFileChooser(multiple, title, filter, selectionMode).openFileChooser();
     }
 
     /**
-     * Creates a new {@link JFileChooser} for several {@link FileFilter}s and makes it visible.
+     * Creates a new {@link AbstractFileChooser} for several {@link FileFilter}s and makes it visible.
      * @param open If true, pops up an "Open File" dialog. If false, pops up a "Save File" dialog
      * @param multiple If true, makes the dialog allow multiple file selections
@@ -121,10 +122,10 @@
      *                      <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul>
      * @param lastDirProperty The name of the property used to setup the JFileChooser initial directory. This property will then be updated to the new "last directory" chosen by the user
-     * @return The {@code JFileChooser}.
+     * @return The {@code AbstractFileChooser}.
      * @since 5438
      */
-    public static JFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title,
+    public static AbstractFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title,
             Collection<? extends FileFilter> filters, FileFilter defaultFilter, int selectionMode, String lastDirProperty) {
-        return new JFileChooserManager(open, lastDirProperty).createFileChooser(multiple, title, filters, defaultFilter, selectionMode).openFileChooser();
+        return new FileChooserManager(open, lastDirProperty).createFileChooser(multiple, title, filters, defaultFilter, selectionMode).openFileChooser();
     }
 }
Index: trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 7578)
@@ -10,9 +10,9 @@
 import java.util.ServiceConfigurationError;
 
-import javax.swing.JFileChooser;
 import javax.swing.filechooser.FileFilter;
 
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 import org.openstreetmap.josm.io.AllFormatsImporter;
 import org.openstreetmap.josm.io.FileExporter;
@@ -224,5 +224,5 @@
 
     /**
-     * Applies the choosable {@link FileFilter} to a {@link JFileChooser} before using the
+     * Applies the choosable {@link FileFilter} to a {@link AbstractFileChooser} before using the
      * file chooser for selecting a file for reading.
      *
@@ -233,5 +233,5 @@
      * @since 5438
      */
-    public static void applyChoosableImportFileFilters(JFileChooser fileChooser, String extension, boolean allTypes) {
+    public static void applyChoosableImportFileFilters(AbstractFileChooser fileChooser, String extension, boolean allTypes) {
         for (ExtensionFileFilter filter: getImportExtensionFileFilters()) {
             if (allTypes || filter.acceptName("file."+extension)) {
@@ -243,5 +243,5 @@
 
     /**
-     * Applies the choosable {@link FileFilter} to a {@link JFileChooser} before using the
+     * Applies the choosable {@link FileFilter} to a {@link AbstractFileChooser} before using the
      * file chooser for selecting a file for writing.
      *
@@ -252,5 +252,5 @@
      * @since 5438
      */
-    public static void applyChoosableExportFileFilters(JFileChooser fileChooser, String extension, boolean allTypes) {
+    public static void applyChoosableExportFileFilters(AbstractFileChooser fileChooser, String extension, boolean allTypes) {
         for (ExtensionFileFilter filter: getExportExtensionFileFilters()) {
             if (allTypes || filter.acceptName("file."+extension)) {
Index: trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 7578)
@@ -25,5 +25,4 @@
 import java.util.regex.Pattern;
 
-import javax.swing.JFileChooser;
 import javax.swing.JOptionPane;
 import javax.swing.SwingUtilities;
@@ -34,4 +33,5 @@
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
 import org.openstreetmap.josm.gui.help.HelpUtil;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 import org.openstreetmap.josm.io.AllFormatsImporter;
 import org.openstreetmap.josm.io.FileImporter;
@@ -65,5 +65,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        JFileChooser fc = createAndOpenFileChooser(true, true, null);
+        AbstractFileChooser fc = createAndOpenFileChooser(true, true, null);
         if (fc == null)
             return;
Index: trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 7578)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 import org.openstreetmap.josm.io.FileExporter;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -136,5 +137,5 @@
      */
     public static File createAndOpenSaveFileChooser(String title, ExtensionFileFilter filter) {
-        JFileChooser fc = createAndOpenFileChooser(false, false, title, filter, JFileChooser.FILES_ONLY, null);
+        AbstractFileChooser fc = createAndOpenFileChooser(false, false, title, filter, JFileChooser.FILES_ONLY, null);
         return checkFileAndConfirmOverWrite(fc, filter.getDefaultExtension());
     }
@@ -150,9 +151,9 @@
      */
     public static File createAndOpenSaveFileChooser(String title, String extension) {
-        JFileChooser fc = createAndOpenFileChooser(false, false, title, extension);
+        AbstractFileChooser fc = createAndOpenFileChooser(false, false, title, extension);
         return checkFileAndConfirmOverWrite(fc, extension);
     }
 
-    private static File checkFileAndConfirmOverWrite(JFileChooser fc, String extension) {
+    private static File checkFileAndConfirmOverWrite(AbstractFileChooser fc, String extension) {
         if (fc == null) return null;
         File file = fc.getSelectedFile();
Index: trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/actions/SessionLoadAction.java	(revision 7578)
@@ -25,4 +25,5 @@
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.gui.util.FileFilterAllFiles;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 import org.openstreetmap.josm.io.IllegalDataException;
 import org.openstreetmap.josm.io.session.SessionImporter;
@@ -47,5 +48,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        JFileChooser fc = createAndOpenFileChooser(true, false, tr("Open session"),
+        AbstractFileChooser fc = createAndOpenFileChooser(true, false, tr("Open session"),
                 Arrays.asList(SessionImporter.FILE_FILTER, FileFilterAllFiles.getInstance()),
                 SessionImporter.FILE_FILTER, JFileChooser.FILES_ONLY, "lastDirectory");
Index: trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 7578)
@@ -36,4 +36,5 @@
 import org.openstreetmap.josm.gui.HelpAwareOptionPane;
 import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 import org.openstreetmap.josm.io.session.SessionLayerExporter;
 import org.openstreetmap.josm.io.session.SessionWriter;
@@ -82,5 +83,5 @@
         FileFilter jos = new ExtensionFileFilter("jos", "jos", tr("Session file (*.jos)"));
 
-        JFileChooser fc;
+        AbstractFileChooser fc;
 
         if (zipRequired) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 7578)
@@ -73,6 +73,7 @@
 import org.openstreetmap.josm.gui.preferences.map.MapPaintPreference;
 import org.openstreetmap.josm.gui.util.FileFilterAllFiles;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
+import org.openstreetmap.josm.gui.widgets.FileChooserManager;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
-import org.openstreetmap.josm.gui.widgets.JFileChooserManager;
 import org.openstreetmap.josm.gui.widgets.JosmTextArea;
 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
@@ -443,5 +444,5 @@
             final StyleSource s = model.getRow(sel);
 
-            JFileChooserManager fcm = new JFileChooserManager(false, "mappaint.clone-style.lastDirectory", System.getProperty("user.home"));
+            FileChooserManager fcm = new FileChooserManager(false, "mappaint.clone-style.lastDirectory", System.getProperty("user.home"));
             String suggestion = fcm.getInitialDirectory() + File.separator + s.getFileNamePart();
 
@@ -454,5 +455,5 @@
             fcm.createFileChooser(false, null, Arrays.asList(ff, FileFilterAllFiles.getInstance()), ff, JFileChooser.FILES_ONLY)
                     .getFileChooser().setSelectedFile(new File(suggestion));
-            JFileChooser fc = fcm.openFileChooser();
+            AbstractFileChooser fc = fcm.openFileChooser();
             if (fc == null)
                 return;
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 7578)
@@ -72,4 +72,5 @@
 import org.openstreetmap.josm.gui.layer.GpxLayer;
 import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 import org.openstreetmap.josm.gui.widgets.JosmComboBox;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
@@ -151,5 +152,5 @@
                 }
             };
-            JFileChooser fc = DiskAccessAction.createAndOpenFileChooser(true, false, null, filter, JFileChooser.FILES_ONLY, null);
+            AbstractFileChooser fc = DiskAccessAction.createAndOpenFileChooser(true, false, null, filter, JFileChooser.FILES_ONLY, null);
             if (fc == null)
                 return;
@@ -383,5 +384,5 @@
                 @Override
                 public void actionPerformed(ActionEvent ae) {
-                    JFileChooser fc = DiskAccessAction.createAndOpenFileChooser(true, false, null, JpegFileFilter.getInstance(),
+                    AbstractFileChooser fc = DiskAccessAction.createAndOpenFileChooser(true, false, null, JpegFileFilter.getInstance(),
                             JFileChooser.FILES_ONLY, "geoimage.lastdirectory");
                     if (fc == null)
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 7578)
@@ -30,4 +30,5 @@
 import org.openstreetmap.josm.gui.layer.markerlayer.AudioMarker;
 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 import org.openstreetmap.josm.tools.AudioUtil;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -78,5 +79,5 @@
             }
         };
-        JFileChooser fc = DiskAccessAction.createAndOpenFileChooser(true, true, null, filter, JFileChooser.FILES_ONLY, "markers.lastaudiodirectory");
+        AbstractFileChooser fc = DiskAccessAction.createAndOpenFileChooser(true, true, null, filter, JFileChooser.FILES_ONLY, "markers.lastaudiodirectory");
         if (fc != null) {
             File[] sel = fc.getSelectedFiles();
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 7578)
@@ -18,5 +18,6 @@
 import org.openstreetmap.josm.gui.layer.GpxLayer;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
-import org.openstreetmap.josm.gui.widgets.JFileChooserManager;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
+import org.openstreetmap.josm.gui.widgets.FileChooserManager;
 import org.openstreetmap.josm.io.JpgImporter;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -53,5 +54,6 @@
         }
         JpgImporter importer = new JpgImporter(layer);
-        JFileChooser fc = new JFileChooserManager(true, "geoimage.lastdirectory", Main.pref.get("lastDirectory")).createFileChooser(true, null, importer.filter, JFileChooser.FILES_AND_DIRECTORIES).openFileChooser();
+        AbstractFileChooser fc = new FileChooserManager(true, "geoimage.lastdirectory", Main.pref.get("lastDirectory")).
+                createFileChooser(true, null, importer.filter, JFileChooser.FILES_AND_DIRECTORIES).openFileChooser();
         if (fc != null) {
             File[] sel = fc.getSelectedFiles();
Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 7578)
@@ -89,5 +89,6 @@
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.util.TableHelper;
-import org.openstreetmap.josm.gui.widgets.JFileChooserManager;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
+import org.openstreetmap.josm.gui.widgets.FileChooserManager;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.io.CachedFile;
@@ -701,5 +702,5 @@
     }
 
-    private static void prepareFileChooser(String url, JFileChooser fc) {
+    private static void prepareFileChooser(String url, AbstractFileChooser fc) {
         if (url == null || url.trim().length() == 0) return;
         URL sourceUrl = null;
@@ -813,8 +814,8 @@
                     return;
                 }
-                JFileChooserManager fcm = new JFileChooserManager(true)
+                FileChooserManager fcm = new FileChooserManager(true)
                         .createFileChooser(true, null, Arrays.asList(ff, FileFilterAllFiles.getInstance()), ff, JFileChooser.FILES_ONLY);
                 prepareFileChooser(tfURL.getText(), fcm.getFileChooser());
-                JFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this));
+                AbstractFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this));
                 if (fc != null) {
                     tfURL.setText(fc.getSelectedFile().toString());
@@ -1512,10 +1513,10 @@
             @Override
             public void actionPerformed(ActionEvent e) {
-                JFileChooserManager fcm = new JFileChooserManager(true).createFileChooser();
+                FileChooserManager fcm = new FileChooserManager(true).createFileChooser();
                 if (!isFile) {
                     fcm.getFileChooser().setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
                 }
                 prepareFileChooser(tfFileName.getText(), fcm.getFileChooser());
-                JFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this));
+                AbstractFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this));
                 if (fc != null) {
                     tfFileName.setText(fc.getSelectedFile().toString());
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 7578)
@@ -46,4 +46,5 @@
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
 import org.openstreetmap.josm.gui.util.GuiHelper;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 import org.openstreetmap.josm.gui.widgets.JosmTextField;
 import org.openstreetmap.josm.tools.GBC;
@@ -197,5 +198,6 @@
             }
         };
-        JFileChooser fc = DiskAccessAction.createAndOpenFileChooser(!saveFileFlag, !saveFileFlag, title, filter, JFileChooser.FILES_ONLY, "customsettings.lastDirectory");
+        AbstractFileChooser fc = DiskAccessAction.createAndOpenFileChooser(!saveFileFlag, !saveFileFlag, title, filter,
+                JFileChooser.FILES_ONLY, "customsettings.lastDirectory");
         if (fc != null) {
             File[] sel = fc.isMultiSelectionEnabled() ? fc.getSelectedFiles() : (new File[]{fc.getSelectedFile()});
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 7578)
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.data.Preferences.Setting;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 
 /**
@@ -71,5 +72,5 @@
             }
         };
-        JFileChooser fc = DiskAccessAction.createAndOpenFileChooser(false, false, title, filter, JFileChooser.FILES_ONLY, "customsettings.lastDirectory");
+        AbstractFileChooser fc = DiskAccessAction.createAndOpenFileChooser(false, false, title, filter, JFileChooser.FILES_ONLY, "customsettings.lastDirectory");
         if (fc != null) {
             File sel = fc.getSelectedFile();
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 7578)
@@ -30,4 +30,5 @@
 import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
+import org.openstreetmap.josm.gui.widgets.FileChooserManager;
 import org.openstreetmap.josm.gui.widgets.JosmComboBox;
 import org.openstreetmap.josm.tools.GBC;
@@ -60,4 +61,5 @@
     private JCheckBox dynamicButtons = new JCheckBox(tr("Dynamic buttons in side menus"));
     private JCheckBox isoDates = new JCheckBox(tr("Display ISO dates"));
+    private JCheckBox nativeFileChoosers = new JCheckBox(tr("Use native file choosers (nicer, but do not support file filters)"));
 
     @Override
@@ -134,4 +136,9 @@
         panel.add(isoDates, GBC.eop().insets(20, 0, 0, 0));
 
+        nativeFileChoosers.setToolTipText(
+                tr("Use file choosers that behave more like native ones. They look nicer but do not support some features like file filters"));
+        nativeFileChoosers.setSelected(FileChooserManager.PROP_USE_NATIVE_FILE_DIALOG.get());
+        panel.add(nativeFileChoosers, GBC.eop().insets(20, 0, 0, 0));
+
         panel.add(Box.createVerticalGlue(), GBC.eol().insets(0, 20, 0, 0));
 
@@ -154,4 +161,5 @@
         Main.pref.put(ToggleDialog.PROP_DYNAMIC_BUTTONS.getKey(), dynamicButtons.isSelected());
         Main.pref.put(DateUtils.PROP_ISO_DATES.getKey(), isoDates.isSelected());
+        Main.pref.put(FileChooserManager.PROP_USE_NATIVE_FILE_DIALOG.getKey(), nativeFileChoosers.isSelected());
         mod |= Main.pref.put("laf", ((LookAndFeelInfo)lafCombo.getSelectedItem()).getClassName());
         return mod;
Index: trunk/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java	(revision 7578)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/AbstractFileChooser.java	(revision 7578)
@@ -0,0 +1,225 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.widgets;
+
+import java.awt.Component;
+import java.awt.HeadlessException;
+import java.io.File;
+import java.util.Locale;
+
+import javax.swing.filechooser.FileFilter;
+
+/**
+ * Abstract class to allow different file chooser implementations.
+ * @since 7578
+ */
+public abstract class AbstractFileChooser {
+
+    /** The locale for both implementations */
+    protected static Locale locale;
+
+    /**
+     * Sets the default locale for all implementations.
+     * @param l locale
+     */
+    public static void setDefaultLocale(Locale l) {
+        locale = l;
+    }
+
+    /**
+     * Adds a filter to the list of user choosable file filters.
+     * For information on setting the file selection mode, see
+     * {@link #setFileSelectionMode setFileSelectionMode}.
+     *
+     * @param filter the <code>FileFilter</code> to add to the choosable file
+     *               filter list
+     *
+     * @see #getChoosableFileFilters
+     * @see #setFileSelectionMode
+     */
+    public abstract void addChoosableFileFilter(FileFilter filter);
+
+    /**
+     * Gets the list of user choosable file filters.
+     *
+     * @return a <code>FileFilter</code> array containing all the choosable
+     *         file filters
+     *
+     * @see #addChoosableFileFilter
+     */
+    public abstract FileFilter[] getChoosableFileFilters();
+
+    /**
+     * Returns the current directory.
+     *
+     * @return the current directory
+     * @see #setCurrentDirectory
+     */
+    public abstract File getCurrentDirectory();
+
+    /**
+     * Returns the currently selected file filter.
+     *
+     * @return the current file filter
+     * @see #setFileFilter
+     * @see #addChoosableFileFilter
+     */
+    public abstract FileFilter getFileFilter();
+
+    /**
+     * Returns the selected file. This can be set either by the
+     * programmer via <code>setSelectedFile</code> or by a user action, such as
+     * either typing the filename into the UI or selecting the
+     * file from a list in the UI.
+     *
+     * @see #setSelectedFile
+     * @return the selected file
+     */
+    public abstract File getSelectedFile();
+
+    /**
+     * Returns a list of selected files if the file chooser is
+     * set to allow multiple selection.
+     * @return a list of selected files if the file chooser is
+     * set to allow multiple selection, or an empty array otherwise.
+     */
+    public abstract File[] getSelectedFiles();
+
+    /**
+     * Returns true if multiple files can be selected.
+     * @return true if multiple files can be selected
+     * @see #setMultiSelectionEnabled
+     */
+    public abstract boolean isMultiSelectionEnabled();
+
+    /**
+     * Determines whether the <code>AcceptAll FileFilter</code> is used
+     * as an available choice in the choosable filter list.
+     * If false, the <code>AcceptAll</code> file filter is removed from
+     * the list of available file filters.
+     * If true, the <code>AcceptAll</code> file filter will become the
+     * the actively used file filter.
+     * @param b whether the <code>AcceptAll FileFilter</code> is used
+     * as an available choice in the choosable filter list
+     *
+     * @see #setFileFilter
+     */
+    public abstract void setAcceptAllFileFilterUsed(boolean b);
+
+    /**
+     * Sets the current directory. Passing in <code>null</code> sets the
+     * file chooser to point to the user's default directory.
+     * This default depends on the operating system. It is
+     * typically the "My Documents" folder on Windows, and the user's
+     * home directory on Unix.
+     *
+     * If the file passed in as <code>currentDirectory</code> is not a
+     * directory, the parent of the file will be used as the currentDirectory.
+     * If the parent is not traversable, then it will walk up the parent tree
+     * until it finds a traversable directory, or hits the root of the
+     * file system.
+     *
+     * @param dir the current directory to point to
+     * @see #getCurrentDirectory
+     */
+    public abstract void setCurrentDirectory(File dir);
+
+    /**
+     * Sets the string that goes in the <code>JFileChooser</code> window's
+     * title bar.
+     *
+     * @param title the new <code>String</code> for the title bar
+     */
+    public abstract void setDialogTitle(String title);
+
+    /**
+     * Sets the current file filter. The file filter is used by the
+     * file chooser to filter out files from the user's view.
+     *
+     * @param filter the new current file filter to use
+     * @see #getFileFilter
+     */
+    public abstract void setFileFilter(final FileFilter filter);
+
+    /**
+     * Sets the <code>JFileChooser</code> to allow the user to just
+     * select files, just select
+     * directories, or select both files and directories.  The default is
+     * <code>JFilesChooser.FILES_ONLY</code>.
+     *
+     * @param selectionMode the type of files to be displayed:
+     * <ul>
+     * <li>JFileChooser.FILES_ONLY
+     * <li>JFileChooser.DIRECTORIES_ONLY
+     * <li>JFileChooser.FILES_AND_DIRECTORIES
+     * </ul>
+     *
+     * @exception IllegalArgumentException  if <code>mode</code> is an
+     *                          illegal file selection mode
+     */
+    public abstract void setFileSelectionMode(int selectionMode);
+
+    /**
+     * Sets the file chooser to allow multiple file selections.
+     *
+     * @param multiple true if multiple files may be selected
+     * @beaninfo
+     *       bound: true
+     * description: Sets multiple file selection mode.
+     *
+     * @see #isMultiSelectionEnabled
+     */
+    public abstract void setMultiSelectionEnabled(boolean multiple);
+
+    /**
+     * Sets the selected file. If the file's parent directory is
+     * not the current directory, changes the current directory
+     * to be the file's parent directory.
+     *
+     * @see #getSelectedFile
+     *
+     * @param file the selected file
+     */
+    public abstract void setSelectedFile(File file);
+
+    /**
+     * Pops up an "Open File" file chooser dialog. Note that the
+     * text that appears in the approve button is determined by
+     * the L&F.
+     *
+     * @param    parent  the parent component of the dialog,
+     *                  can be <code>null</code>;
+     *                  see <code>showDialog</code> for details
+     * @return   the return state of the file chooser on popdown:
+     * <ul>
+     * <li>JFileChooser.CANCEL_OPTION
+     * <li>JFileChooser.APPROVE_OPTION
+     * <li>JFileChooser.ERROR_OPTION if an error occurs or the
+     *                  dialog is dismissed
+     * </ul>
+     * @exception HeadlessException if GraphicsEnvironment.isHeadless()
+     * returns true.
+     * @see java.awt.GraphicsEnvironment#isHeadless
+     */
+    public abstract int showOpenDialog(Component parent);
+
+    /**
+     * Pops up a "Save File" file chooser dialog. Note that the
+     * text that appears in the approve button is determined by
+     * the L&F.
+     *
+     * @param    parent  the parent component of the dialog,
+     *                  can be <code>null</code>;
+     *                  see <code>showDialog</code> for details
+     * @return   the return state of the file chooser on popdown:
+     * <ul>
+     * <li>JFileChooser.CANCEL_OPTION
+     * <li>JFileChooser.APPROVE_OPTION
+     * <li>JFileChooser.ERROR_OPTION if an error occurs or the
+     *                  dialog is dismissed
+     * </ul>
+     * @exception HeadlessException if GraphicsEnvironment.isHeadless()
+     * returns true.
+     * @see java.awt.GraphicsEnvironment#isHeadless
+     */
+    public abstract int showSaveDialog(Component parent);
+}
Index: trunk/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java	(revision 7578)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/FileChooserManager.java	(revision 7578)
@@ -0,0 +1,231 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.widgets;
+
+import java.awt.Component;
+import java.io.File;
+import java.util.Collection;
+import java.util.Collections;
+
+import javax.swing.JFileChooser;
+import javax.swing.filechooser.FileFilter;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.DiskAccessAction;
+import org.openstreetmap.josm.actions.ExtensionFileFilter;
+import org.openstreetmap.josm.actions.SaveActionBase;
+import org.openstreetmap.josm.data.preferences.BooleanProperty;
+
+/**
+ * A chained utility class used to create and open {@link AbstractFileChooser} dialogs.<br>
+ * Use only this class if you need to control specifically your AbstractFileChooser dialog.<br>
+ * <p>
+ * A simpler usage is to call the {@link DiskAccessAction#createAndOpenFileChooser} methods.
+ *
+ * @since 5438 (creation)
+ * @since 7578 (rename)
+ */
+public class FileChooserManager {
+
+    /**
+     * Property to enable use of native file dialogs.
+     */
+    public static final BooleanProperty PROP_USE_NATIVE_FILE_DIALOG = new BooleanProperty("use.native.file.dialog", false);
+
+    private final boolean open;
+    private final String lastDirProperty;
+    private final String curDir;
+
+    private AbstractFileChooser fc;
+
+    /**
+     * Creates a new {@code FileChooserManager}.
+     * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created.
+     * @see #createFileChooser
+     */
+    public FileChooserManager(boolean open) {
+        this(open, null);
+    }
+
+    /**
+     * Creates a new {@code FileChooserManager}.
+     * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created.
+     * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the AbstractFileChooser.
+     *                        Then, if the user effectively chooses a file or a directory, this property will be updated to the directory path.
+     * @see #createFileChooser
+     */
+    public FileChooserManager(boolean open, String lastDirProperty) {
+        this(open, lastDirProperty, null);
+    }
+
+    /**
+     * Creates a new {@code FileChooserManager}.
+     * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created.
+     * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the AbstractFileChooser.
+     *                        Then, if the user effectively chooses a file or a directory, this property will be updated to the directory path.
+     * @param defaultDir The default directory used to initialize the AbstractFileChooser if the {@code lastDirProperty} property value is missing.
+     * @see #createFileChooser
+     */
+    public FileChooserManager(boolean open, String lastDirProperty, String defaultDir) {
+        this.open = open;
+        this.lastDirProperty = lastDirProperty == null || lastDirProperty.isEmpty() ? "lastDirectory" : lastDirProperty;
+        this.curDir = Main.pref.get(this.lastDirProperty).isEmpty() ?
+                (defaultDir == null || defaultDir.isEmpty() ? "." : defaultDir)
+                : Main.pref.get(this.lastDirProperty);
+    }
+
+    /**
+     * Replies the {@code AbstractFileChooser} that has been previously created.
+     * @return The {@code AbstractFileChooser} that has been previously created, or {@code null} if it has not been created yet.
+     * @see #createFileChooser
+     */
+    public final AbstractFileChooser getFileChooser() {
+        return fc;
+    }
+
+    /**
+     * Replies the initial directory used to construct the {@code AbstractFileChooser}.
+     * @return The initial directory used to construct the {@code AbstractFileChooser}.
+     */
+    public final String getInitialDirectory() {
+        return curDir;
+    }
+
+    /**
+     * Creates a new {@link AbstractFileChooser} with default settings. All files will be accepted.
+     * @return this
+     */
+    public final FileChooserManager createFileChooser() {
+        return doCreateFileChooser(false, null, null, null, null, JFileChooser.FILES_ONLY, false);
+    }
+
+    /**
+     * Creates a new {@link AbstractFileChooser} with given settings for a single {@code FileFilter}.
+     *
+     * @param multiple If true, makes the dialog allow multiple file selections
+     * @param title The string that goes in the dialog window's title bar
+     * @param filter The only file filter that will be proposed by the dialog
+     * @param selectionMode The selection mode that allows the user to:<br><ul>
+     *                      <li>just select files ({@code JFileChooser.FILES_ONLY})</li>
+     *                      <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li>
+     *                      <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul>
+     * @return this
+     * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, FileFilter, int, String)
+     */
+    public final FileChooserManager createFileChooser(boolean multiple, String title, FileFilter filter, int selectionMode) {
+        doCreateFileChooser(multiple, title, Collections.singleton(filter), filter, null, selectionMode, false);
+        getFileChooser().setAcceptAllFileFilterUsed(false);
+        return this;
+    }
+
+    /**
+     * Creates a new {@link AbstractFileChooser} with given settings for a collection of {@code FileFilter}s.
+     *
+     * @param multiple If true, makes the dialog allow multiple file selections
+     * @param title The string that goes in the dialog window's title bar
+     * @param filters The file filters that will be proposed by the dialog
+     * @param defaultFilter The file filter that will be selected by default
+     * @param selectionMode The selection mode that allows the user to:<br><ul>
+     *                      <li>just select files ({@code JFileChooser.FILES_ONLY})</li>
+     *                      <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li>
+     *                      <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul>
+     * @return this
+     * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, Collection, FileFilter, int, String)
+     */
+    public final FileChooserManager createFileChooser(boolean multiple, String title, Collection<? extends FileFilter> filters,
+            FileFilter defaultFilter, int selectionMode) {
+        return doCreateFileChooser(multiple, title, filters, defaultFilter, null, selectionMode, false);
+    }
+
+    /**
+     * Creates a new {@link AbstractFileChooser} with given settings for a file extension.
+     *
+     * @param multiple If true, makes the dialog allow multiple file selections
+     * @param title The string that goes in the dialog window's title bar
+     * @param extension The file extension that will be selected as the default file filter
+     * @param allTypes If true, all the files types known by JOSM will be proposed in the "file type" combobox.
+     *                 If false, only the file filters that include {@code extension} will be proposed
+     * @param selectionMode The selection mode that allows the user to:<br><ul>
+     *                      <li>just select files ({@code JFileChooser.FILES_ONLY})</li>
+     *                      <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li>
+     *                      <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul>
+     * @return this
+     * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, FileFilter, int, String)
+     */
+    public final FileChooserManager createFileChooser(boolean multiple, String title, String extension, boolean allTypes, int selectionMode) {
+        return doCreateFileChooser(multiple, title, null, null, extension, selectionMode, allTypes);
+    }
+
+    private final FileChooserManager doCreateFileChooser(boolean multiple, String title, Collection<? extends FileFilter> filters,
+            FileFilter defaultFilter, String extension, int selectionMode, boolean allTypes) {
+        File file = new File(curDir);
+        // Use native dialog is preference is set, unless an unsupported selection mode is specifically wanted
+        if (PROP_USE_NATIVE_FILE_DIALOG.get() && NativeFileChooser.supportsSelectionMode(selectionMode)) {
+            fc = new NativeFileChooser(file);
+        } else {
+            fc = new SwingFileChooser(file);
+        }
+
+        if (title != null) {
+            fc.setDialogTitle(title);
+        }
+
+        fc.setFileSelectionMode(selectionMode);
+        fc.setMultiSelectionEnabled(multiple);
+        fc.setAcceptAllFileFilterUsed(false);
+
+        if (filters != null) {
+            for (FileFilter filter : filters) {
+                fc.addChoosableFileFilter(filter);
+            }
+            if (defaultFilter != null) {
+                fc.setFileFilter(defaultFilter);
+            }
+        } else if (open) {
+            ExtensionFileFilter.applyChoosableImportFileFilters(fc, extension, allTypes);
+        } else {
+            ExtensionFileFilter.applyChoosableExportFileFilters(fc, extension, allTypes);
+        }
+        return this;
+    }
+
+    /**
+     * Opens the {@code AbstractFileChooser} that has been created. Nothing happens if it has not been created yet.
+     * @return the {@code AbstractFileChooser} if the user effectively choses a file or directory. {@code null} if the user cancelled the dialog.
+     */
+    public final AbstractFileChooser openFileChooser() {
+        return openFileChooser(null);
+    }
+
+    /**
+     * Opens the {@code AbstractFileChooser} that has been created and waits for the user to choose a file/directory, or cancel the dialog.<br>
+     * Nothing happens if the dialog has not been created yet.<br>
+     * When the user choses a file or directory, the {@code lastDirProperty} is updated to the chosen directory path.
+     *
+     * @param parent The Component used as the parent of the AbstractFileChooser. If null, uses {@code Main.parent}.
+     * @return the {@code AbstractFileChooser} if the user effectively choses a file or directory. {@code null} if the user cancelled the dialog.
+     */
+    public AbstractFileChooser openFileChooser(Component parent) {
+        if (fc != null) {
+            if (parent == null) {
+                parent = Main.parent;
+            }
+
+            int answer = open ? fc.showOpenDialog(parent) : fc.showSaveDialog(parent);
+            if (answer != JFileChooser.APPROVE_OPTION) {
+                return null;
+            }
+
+            if (!fc.getCurrentDirectory().getAbsolutePath().equals(curDir)) {
+                Main.pref.put(lastDirProperty, fc.getCurrentDirectory().getAbsolutePath());
+            }
+
+            if (!open) {
+                File file = fc.getSelectedFile();
+                if (!SaveActionBase.confirmOverwrite(file)) {
+                    return null;
+                }
+            }
+        }
+        return fc;
+    }
+}
Index: trunk/src/org/openstreetmap/josm/gui/widgets/JFileChooserManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/JFileChooserManager.java	(revision 7577)
+++ 	(revision )
@@ -1,214 +1,0 @@
-// License: GPL. For details, see LICENSE file.
-package org.openstreetmap.josm.gui.widgets;
-
-import java.awt.Component;
-import java.io.File;
-import java.util.Collection;
-import java.util.Collections;
-
-import javax.swing.JFileChooser;
-import javax.swing.filechooser.FileFilter;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.actions.DiskAccessAction;
-import org.openstreetmap.josm.actions.ExtensionFileFilter;
-import org.openstreetmap.josm.actions.SaveActionBase;
-
-/**
- * A chained utility class used to create and open {@link JFileChooser} dialogs.<br>
- * Use only this class if you need to control specifically your JFileChooser dialog.<br>
- * <p>
- * A simpler usage is to call the {@link DiskAccessAction#createAndOpenFileChooser} methods.
- *
- * @since 5438
- */
-public class JFileChooserManager {
-    private final boolean open;
-    private final String lastDirProperty;
-    private final String curDir;
-
-    private JFileChooser fc;
-
-    /**
-     * Creates a new {@code JFileChooserManager}.
-     * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created.
-     * @see #createFileChooser
-     */
-    public JFileChooserManager(boolean open) {
-        this(open, null);
-    }
-
-    /**
-     * Creates a new {@code JFileChooserManager}.
-     * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created.
-     * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the JFileChooser.
-     *                        Then, if the user effectively chooses a file or a directory, this property will be updated to the directory path.
-     * @see #createFileChooser
-     */
-    public JFileChooserManager(boolean open, String lastDirProperty) {
-        this(open, lastDirProperty, null);
-    }
-
-    /**
-     * Creates a new {@code JFileChooserManager}.
-     * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created.
-     * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the JFileChooser.
-     *                        Then, if the user effectively chooses a file or a directory, this property will be updated to the directory path.
-     * @param defaultDir The default directory used to initialize the JFileChooser if the {@code lastDirProperty} property value is missing.
-     * @see #createFileChooser
-     */
-    public JFileChooserManager(boolean open, String lastDirProperty, String defaultDir) {
-        this.open = open;
-        this.lastDirProperty = lastDirProperty == null || lastDirProperty.isEmpty() ? "lastDirectory" : lastDirProperty;
-        this.curDir = Main.pref.get(this.lastDirProperty).isEmpty() ?
-                (defaultDir == null || defaultDir.isEmpty() ? "." : defaultDir)
-                : Main.pref.get(this.lastDirProperty);
-    }
-
-    /**
-     * Replies the {@code JFileChooser} that has been previously created.
-     * @return The {@code JFileChooser} that has been previously created, or {@code null} if it has not been created yet.
-     * @see #createFileChooser
-     */
-    public final JFileChooser getFileChooser() {
-        return fc;
-    }
-
-    /**
-     * Replies the initial directory used to construct the {@code JFileChooser}.
-     * @return The initial directory used to construct the {@code JFileChooser}.
-     */
-    public final String getInitialDirectory() {
-        return curDir;
-    }
-
-    /**
-     * Creates a new {@link JFileChooser} with default settings. All files will be accepted.
-     * @return this
-     */
-    public final JFileChooserManager createFileChooser() {
-        return doCreateFileChooser(false, null, null, null, null, JFileChooser.FILES_ONLY, false);
-    }
-
-    /**
-     * Creates a new {@link JFileChooser} with given settings for a single {@code FileFilter}.
-     *
-     * @param multiple If true, makes the dialog allow multiple file selections
-     * @param title The string that goes in the dialog window's title bar
-     * @param filter The only file filter that will be proposed by the dialog
-     * @param selectionMode The selection mode that allows the user to:<br><ul>
-     *                      <li>just select files ({@code JFileChooser.FILES_ONLY})</li>
-     *                      <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li>
-     *                      <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul>
-     * @return this
-     * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, FileFilter, int, String)
-     */
-    public final JFileChooserManager createFileChooser(boolean multiple, String title, FileFilter filter, int selectionMode) {
-        doCreateFileChooser(multiple, title, Collections.singleton(filter), filter, null, selectionMode, false);
-        getFileChooser().setAcceptAllFileFilterUsed(false);
-        return this;
-    }
-
-    /**
-     * Creates a new {@link JFileChooser} with given settings for a collection of {@code FileFilter}s.
-     *
-     * @param multiple If true, makes the dialog allow multiple file selections
-     * @param title The string that goes in the dialog window's title bar
-     * @param filters The file filters that will be proposed by the dialog
-     * @param defaultFilter The file filter that will be selected by default
-     * @param selectionMode The selection mode that allows the user to:<br><ul>
-     *                      <li>just select files ({@code JFileChooser.FILES_ONLY})</li>
-     *                      <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li>
-     *                      <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul>
-     * @return this
-     * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, Collection, FileFilter, int, String)
-     */
-    public final JFileChooserManager createFileChooser(boolean multiple, String title, Collection<? extends FileFilter> filters, FileFilter defaultFilter, int selectionMode) {
-        return doCreateFileChooser(multiple, title, filters, defaultFilter, null, selectionMode, false);
-    }
-
-    /**
-     * Creates a new {@link JFileChooser} with given settings for a file extension.
-     *
-     * @param multiple If true, makes the dialog allow multiple file selections
-     * @param title The string that goes in the dialog window's title bar
-     * @param extension The file extension that will be selected as the default file filter
-     * @param allTypes If true, all the files types known by JOSM will be proposed in the "file type" combobox.
-     *                 If false, only the file filters that include {@code extension} will be proposed
-     * @param selectionMode The selection mode that allows the user to:<br><ul>
-     *                      <li>just select files ({@code JFileChooser.FILES_ONLY})</li>
-     *                      <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li>
-     *                      <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul>
-     * @return this
-     * @see DiskAccessAction#createAndOpenFileChooser(boolean, boolean, String, FileFilter, int, String)
-     */
-    public final JFileChooserManager createFileChooser(boolean multiple, String title, String extension, boolean allTypes, int selectionMode) {
-        return doCreateFileChooser(multiple, title, null, null, extension, selectionMode, allTypes);
-    }
-
-    private final JFileChooserManager doCreateFileChooser(boolean multiple, String title, Collection<? extends FileFilter> filters, FileFilter defaultFilter, String extension, int selectionMode, boolean allTypes) {
-        fc = new JFileChooser(new File(curDir));
-        if (title != null) {
-            fc.setDialogTitle(title);
-        }
-
-        fc.setFileSelectionMode(selectionMode);
-        fc.setMultiSelectionEnabled(multiple);
-        fc.setAcceptAllFileFilterUsed(false);
-
-        if (filters != null) {
-            for (FileFilter filter : filters) {
-                fc.addChoosableFileFilter(filter);
-            }
-            if (defaultFilter != null) {
-                fc.setFileFilter(defaultFilter);
-            }
-        } else if (open) {
-            ExtensionFileFilter.applyChoosableImportFileFilters(fc, extension, allTypes);
-        } else {
-            ExtensionFileFilter.applyChoosableExportFileFilters(fc, extension, allTypes);
-        }
-        return this;
-    }
-
-    /**
-     * Opens the {@code JFileChooser} that has been created. Nothing happens if it has not been created yet.
-     * @return the {@code JFileChooser} if the user effectively choses a file or directory. {@code null} if the user cancelled the dialog.
-     */
-    public final JFileChooser openFileChooser() {
-        return openFileChooser(null);
-    }
-
-    /**
-     * Opens the {@code JFileChooser} that has been created and waits for the user to choose a file/directory, or cancel the dialog.<br>
-     * Nothing happens if the dialog has not been created yet.<br>
-     * When the user choses a file or directory, the {@code lastDirProperty} is updated to the chosen directory path.
-     *
-     * @param parent The Component used as the parent of the JFileChooser. If null, uses {@code Main.parent}.
-     * @return the {@code JFileChooser} if the user effectively choses a file or directory. {@code null} if the user cancelled the dialog.
-     */
-    public JFileChooser openFileChooser(Component parent) {
-        if (fc != null) {
-            if (parent == null) {
-                parent = Main.parent;
-            }
-
-            int answer = open ? fc.showOpenDialog(parent) : fc.showSaveDialog(parent);
-            if (answer != JFileChooser.APPROVE_OPTION) {
-                return null;
-            }
-
-            if (!fc.getCurrentDirectory().getAbsolutePath().equals(curDir)) {
-                Main.pref.put(lastDirProperty, fc.getCurrentDirectory().getAbsolutePath());
-            }
-
-            if (!open) {
-                File file = fc.getSelectedFile();
-                if (!SaveActionBase.confirmOverwrite(file)) {
-                    return null;
-                }
-            }
-        }
-        return fc;
-    }
-}
Index: trunk/src/org/openstreetmap/josm/gui/widgets/NativeFileChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/NativeFileChooser.java	(revision 7578)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/NativeFileChooser.java	(revision 7578)
@@ -0,0 +1,176 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.widgets;
+
+import java.awt.Component;
+import java.awt.FileDialog;
+import java.awt.Frame;
+import java.io.File;
+import java.io.FilenameFilter;
+
+import javax.swing.JFileChooser;
+import javax.swing.filechooser.FileFilter;
+
+import org.openstreetmap.josm.Main;
+
+/**
+ * File chooser based on the AWT's {@link FileDialog} implementation,
+ * which looks like more a native file chooser than the Swing implementation.
+ * @since 7578
+ */
+public class NativeFileChooser extends AbstractFileChooser {
+
+    /** The instance of the fileDialog */
+    private final FileDialog fileDialog;
+    private FileFilter fileFilter;
+    private int selectionMode;
+
+    /**
+     * Constructs a new {@code NativeFileChooser}.
+     * @param file the current file/directory to point to
+     */
+    public NativeFileChooser(File file) {
+        fileDialog = new FileDialog((Frame) Main.parent);
+        if (file != null) {
+            fileDialog.setDirectory(file.getAbsolutePath());
+            fileDialog.setFile(file.toString());
+        }
+    }
+
+    @Override
+    public void addChoosableFileFilter(FileFilter filter) {
+        // TODO implement this after Oracle fixes JDK-4811090 / JDK-6192906
+        // https://bugs.openjdk.java.net/browse/JDK-4811090 : Extend awt filedialog
+        // https://bugs.openjdk.java.net/browse/JDK-6192906 : Add more features to java.awt.FileDialog
+    }
+
+    @Override
+    public FileFilter[] getChoosableFileFilters() {
+        // TODO implement this after Oracle fixes JDK-4811090 / JDK-6192906
+        // https://bugs.openjdk.java.net/browse/JDK-4811090 : Extend awt filedialog
+        // https://bugs.openjdk.java.net/browse/JDK-6192906 : Add more features to java.awt.FileDialog
+        return new FileFilter[]{};
+    }
+
+    @Override
+    public File getCurrentDirectory() {
+        return new File(fileDialog.getDirectory());
+    }
+
+    @Override
+    public FileFilter getFileFilter() {
+        return fileFilter;
+    }
+
+    @Override
+    public File getSelectedFile() {
+        return new File(fileDialog.getDirectory() + fileDialog.getFile());
+    }
+
+    @Override
+    public File[] getSelectedFiles() {
+        return fileDialog.getFiles();
+    }
+
+    @Override
+    public boolean isMultiSelectionEnabled() {
+        return fileDialog.isMultipleMode();
+    }
+
+    @Override
+    public void setAcceptAllFileFilterUsed(boolean b) {
+        // TODO implement this after Oracle fixes JDK-4811090 / JDK-6192906
+        // https://bugs.openjdk.java.net/browse/JDK-4811090 : Extend awt filedialog
+        // https://bugs.openjdk.java.net/browse/JDK-6192906 : Add more features to java.awt.FileDialog
+    }
+
+    @Override
+    public void setCurrentDirectory(File f) {
+        fileDialog.setDirectory(f.toString());
+    }
+
+    @Override
+    public void setDialogTitle(String title) {
+        fileDialog.setTitle(title);
+    }
+
+    @Override
+    public void setFileFilter(final FileFilter cff) {
+        FilenameFilter filter = new FilenameFilter() {
+            public boolean accept(File Directory, String fileName) {
+                return cff.accept(new File(Directory.getAbsolutePath() + fileName));
+            }
+        };
+        fileDialog.setFilenameFilter(filter);
+        fileFilter = cff;
+    }
+
+    @Override
+    public void setFileSelectionMode(int selectionMode) {
+        // TODO implement this after Oracle fixes JDK-6192906 / JDK-6699863 / JDK-6927978 / JDK-7125172:
+        // https://bugs.openjdk.java.net/browse/JDK-6192906 : Add more features to java.awt.FileDialog
+        // https://bugs.openjdk.java.net/browse/JDK-6699863 : awt filedialog cannot select directories
+        // https://bugs.openjdk.java.net/browse/JDK-6927978 : Directory Selection standard dialog support
+        // https://bugs.openjdk.java.net/browse/JDK-7125172 : FileDialog objects don't allow directory AND files selection simultaneously
+
+        // There is however a basic support for directory selection on OS X, with Java >= 7u40:
+        // http://stackoverflow.com/questions/1224714/how-can-i-make-a-java-filedialog-accept-directories-as-its-filetype-in-os-x/1224744#1224744
+        // https://bugs.openjdk.java.net/browse/JDK-7161437 : [macosx] awt.FileDialog doesn't respond appropriately for mac when selecting folders
+        this.selectionMode = selectionMode;
+    }
+
+    @Override
+    public void setMultiSelectionEnabled(boolean multiple) {
+        fileDialog.setMultipleMode(multiple);
+    }
+
+    @Override
+    public void setSelectedFile(File file) {
+        fileDialog.setDirectory(file.getAbsolutePath());
+        fileDialog.setFile(file.getName());
+    }
+
+    @Override
+    public int showOpenDialog(Component parent) {
+        boolean appleProperty = Main.isPlatformOsx() && selectionMode == JFileChooser.DIRECTORIES_ONLY;
+        if (appleProperty) {
+            System.setProperty("apple.awt.fileDialogForDirectories", "true");
+        }
+        try {
+            fileDialog.setLocale(locale);
+            fileDialog.setMode(FileDialog.LOAD);
+            fileDialog.setVisible(true);
+            return fileDialog.getFile() == null ? JFileChooser.CANCEL_OPTION : JFileChooser.APPROVE_OPTION;
+        } finally {
+            if (appleProperty) {
+                System.setProperty("apple.awt.fileDialogForDirectories", "false");
+            }
+        }
+    }
+
+    @Override
+    public int showSaveDialog(Component parent) {
+        fileDialog.setLocale(locale);
+        fileDialog.setMode(FileDialog.SAVE);
+        fileDialog.setVisible(true);
+        return fileDialog.getFile() == null ? JFileChooser.CANCEL_OPTION : JFileChooser.APPROVE_OPTION;
+    }
+
+    /**
+     * Determines if the selection mode is suuported by the native file chooser.
+     * @param selectionMode the selection mode
+     * @return {@code true} if the selection mode is supported, {@code false} otherwise
+     */
+    public static boolean supportsSelectionMode(int selectionMode) {
+        switch (selectionMode) {
+        case JFileChooser.FILES_AND_DIRECTORIES:
+            // https://bugs.openjdk.java.net/browse/JDK-7125172 : FileDialog objects don't allow directory AND files selection simultaneously
+            return false;
+        case JFileChooser.DIRECTORIES_ONLY:
+            // http://stackoverflow.com/questions/1224714/how-can-i-make-a-java-filedialog-accept-directories-as-its-filetype-in-os-x/1224744#1224744
+            return Main.isPlatformOsx();
+        case JFileChooser.FILES_ONLY:
+        default:
+            return true;
+        }
+    }
+}
Index: trunk/src/org/openstreetmap/josm/gui/widgets/SwingFileChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/SwingFileChooser.java	(revision 7578)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/SwingFileChooser.java	(revision 7578)
@@ -0,0 +1,108 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.widgets;
+
+import java.awt.Component;
+import java.io.File;
+
+import javax.swing.JFileChooser;
+import javax.swing.filechooser.FileFilter;
+
+/**
+ * File chooser based on the Swing's {@link JFileChooser} implementation.
+ * @since 7578
+ */
+public class SwingFileChooser extends AbstractFileChooser {
+
+    /** The JFileChooser which we use for this. */
+    private final JFileChooser jFileChooser;
+
+    /**
+     * Constructs a new {@code SwingFileChooser}.
+     * @param file the current file/directory to point to
+     */
+    public SwingFileChooser(File file) {
+        jFileChooser = new JFileChooser(file);
+    }
+
+    @Override
+    public void addChoosableFileFilter(FileFilter filter) {
+        jFileChooser.addChoosableFileFilter(filter);
+    }
+
+    @Override
+    public FileFilter[] getChoosableFileFilters() {
+        return jFileChooser.getChoosableFileFilters();
+    }
+
+    @Override
+    public File getCurrentDirectory() {
+        return jFileChooser.getCurrentDirectory();
+    }
+
+    @Override
+    public FileFilter getFileFilter() {
+        return jFileChooser.getFileFilter();
+    }
+
+    @Override
+    public File getSelectedFile() {
+        return jFileChooser.getSelectedFile();
+    }
+
+    @Override
+    public File[] getSelectedFiles() {
+        return jFileChooser.getSelectedFiles();
+    }
+
+    @Override
+    public boolean isMultiSelectionEnabled() {
+        return jFileChooser.isMultiSelectionEnabled();
+    }
+
+    @Override
+    public void setAcceptAllFileFilterUsed(boolean b) {
+        jFileChooser.setAcceptAllFileFilterUsed(b);
+    }
+
+    @Override
+    public void setCurrentDirectory(File f) {
+        jFileChooser.setCurrentDirectory(f);
+    }
+
+    @Override
+    public void setDialogTitle(String title) {
+        jFileChooser.setDialogTitle(title);
+    }
+
+    @Override
+    public void setFileFilter(FileFilter cff) {
+        jFileChooser.setFileFilter(cff);
+    }
+
+    @Override
+    public void setFileSelectionMode(int selectionMode) {
+        jFileChooser.setFileSelectionMode(selectionMode);
+    }
+
+    @Override
+    public void setMultiSelectionEnabled(boolean multiple) {
+        jFileChooser.setMultiSelectionEnabled(multiple);
+    }
+
+    @Override
+    public void setSelectedFile(File file) {
+        jFileChooser.setSelectedFile(file);
+    }
+
+    @Override
+    public int showOpenDialog(Component parent) {
+        jFileChooser.setLocale(locale);
+        return jFileChooser.showOpenDialog(parent);
+    }
+
+    @Override
+    public int showSaveDialog(Component parent) {
+        jFileChooser.setLocale(locale);
+        return jFileChooser.showSaveDialog(parent);
+    }
+}
Index: trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 7577)
+++ trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 7578)
@@ -26,4 +26,5 @@
 import org.openstreetmap.gui.jmapviewer.FeatureAdapter.TranslationAdapter;
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
 
 /**
@@ -641,4 +642,5 @@
         Locale l = Locale.getDefault();
 
+        AbstractFileChooser.setDefaultLocale(l);
         JFileChooser.setDefaultLocale(l);
         JColorChooser.setDefaultLocale(l);
