File f = new File(fd.getFile());
File f = new File(fd.getDirectory() + File.separator + fd.getFile());
    public void actionPerformed(ActionEvent e) {        if (e.getSource().equals(butOK)) {            if (applyValues()) {                this.setVisible(false);            }        } else if (e.getSource().equals(butSave)) {            FileDialog fd = new FileDialog(this, Messages.getString("RandomMapDialog.FileSaveDialog"), FileDialog.SAVE); //$NON-NLS-1$            fd.setDirectory("./data/boards/");            fd.setFilenameFilter(new FilenameFilter() { public boolean accept(File f, String s) {return s.endsWith(".xml"); } });            fd.setModal(true);            fd.setVisible(true);            File f = new File(fd.getFile());            try {                mapSettings.save(new FileOutputStream(f));            } catch (Exception ex) {                ex.printStackTrace();            }        } else if (e.getSource().equals(butLoad)) {            FileDialog fd = new FileDialog(this, Messages.getString("RandomMapDialog.FileLoadDialog"), FileDialog.LOAD); //$NON-NLS-1$            fd.setDirectory("./data/boards/");            fd.setFilenameFilter(new FilenameFilter() { public boolean accept(File f, String s) {return s.endsWith(".xml"); } });            fd.setModal(true);            fd.setVisible(true);            File f = new File(fd.getFile());            try {                mapSettings.load(new FileInputStream(f));            } catch (Exception ex) {                ex.printStackTrace();            }            loadValues();            if(!advanced) {                advanced = true;                butAdvanced.setLabel(Messages.getString("RandomMapDialog.Normal")); //$NON-NLS-1$                setupOptions();                setProperSize();            }        } else {            advanced = !advanced;            if (advanced) {                butAdvanced.setLabel(Messages.getString("RandomMapDialog.Normal")); //$NON-NLS-1$            } else {                butAdvanced.setLabel(Messages.getString("RandomMapDialog.Advanced")); //$NON-NLS-1$            }            setupOptions();            setProperSize();        }    }