ch.addChoosableFileFilter( new TiledFileFilter(TiledFileFilter.FILTER_TMX));
    private void openMap() {        String startLocation = "";        // Start at the location of the most recently loaded map file        if (configuration.hasOption("tmx.recent.1")) {            startLocation = configuration.getValue("tmx.recent.1");        }        JFileChooser ch = new JFileChooser(startLocation);        ch.addChoosableFileFilter(                new TiledFileFilter(TiledFileFilter.FILTER_TMX));        try {            MapReader readers[] = (MapReader[]) pluginLoader.getReaders();            for(int i = 0; i < readers.length; i++) {                ch.addChoosableFileFilter(new TiledFileFilter(                            readers[i].getFilter(), readers[i].getName()));            }        } catch (Throwable e) {            JOptionPane.showMessageDialog(appFrame,                    "Error while loading plugins: " + e.getMessage(),                    "Error while loading map",                    JOptionPane.ERROR_MESSAGE);            e.printStackTrace();        }        int ret = ch.showOpenDialog(appFrame);        if (ret == JFileChooser.APPROVE_OPTION) {            loadMap(ch.getSelectedFile().getAbsolutePath());        }    }