java.util.ResourceBundle.getBundle("global").getString("discardWarn"), java.util.ResourceBundle.getBundle("global").getString("Hint"), JOptionPane.YES_NO_CANCEL_OPTION);
"Changes to this file will be lost, save it now?", "Notice", JOptionPane.YES_NO_CANCEL_OPTION);
    public boolean checkSave(boolean justSave, boolean needFileName) {        int res;        String newFilename;                if (justSave) {            res = JOptionPane.YES_OPTION;        } else {            res = JOptionPane.showConfirmDialog(this,                    java.util.ResourceBundle.getBundle("global").getString("discardWarn"),                    java.util.ResourceBundle.getBundle("global").getString("Hint"), JOptionPane.YES_NO_CANCEL_OPTION);        }                switch(res) {            case JOptionPane.YES_OPTION:                // speichern (als), dann $aktion                if (!needFileName && filename.length()==0) needFileName = true;                if (needFileName) {                    newFilename = FileIO.getSaveFilename(this, filename);                    if (newFilename!=null)                        filename = newFilename;                    else                        return true;                }                try {                    FileIO.fsaListToFile(side.getList(), filename);                    setTitle(verString+"-"+filename);                    side.insertResults(filename+" gesichert");                } catch (Exception ex) {                    JOptionPane.showMessageDialog(this, "Fehler beim Schreiben, prfen Sie Dateinamen/rechte",                            "Fehler", JOptionPane.ERROR_MESSAGE);                }                                return true;            case JOptionPane.NO_OPTION:                // nicht speichern, dann $aktion                return true;        }        return false; // implizit der cancel fall    }