if (JOptionPane.showConfirmDialog(null, UNSAVED_MSG,
if (JOptionPane.showConfirmDialog(null, "This " + TYPE + " may contain unsaved data.\nSave before closing?",
        public void JSLFrameClosing(JSLFrameEvent e) {            if (!changed)                return;            // close Patch/Bank Editor editing a patch in this frame.            JSLFrame[] jList = JSLDesktop.getAllFrames();            for (int j = 0; j < jList.length; j++) {                if (jList[j] instanceof BankEditorFrame) {                    for (int i = 0; i < myModel.getRowCount(); i++)                        if (((BankEditorFrame) (jList[j])).bankData == myModel                                .getPatchAt(i)) {                            jList[j].moveToFront();                            try {                                jList[j].setSelected(true);                                jList[j].setClosed(true);                            } catch (Exception e1) {                                ErrorMsg.reportStatus(e1);                            }                            break;                        }                }                if (jList[j] instanceof PatchEditorFrame) {                    for (int i = 0; i < myModel.getRowCount(); i++)                        if (((PatchEditorFrame) (jList[j])).p == myModel                                .getPatchAt(i)) {                            jList[j].moveToFront();                            try {                                jList[j].setSelected(true);                                jList[j].setClosed(true);                            } catch (Exception e1) {                                ErrorMsg.reportStatus(e1);                            }                            break;                        }                }            }            if (JOptionPane.showConfirmDialog(null, UNSAVED_MSG,                    "Unsaved Data", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION)                return;            moveToFront();            Actions.saveFrame();        }