for (int j=0;j<jList.length;j++) { if (jList[j] instanceof BankEditorFrame) { for (i=0;i<myModel.sceneList.size();i++) if (((BankEditorFrame)(jList[j])).bankData==((Scene)myModel.sceneList.get(i)).getPatch()) { jList[j].moveToFront(); try { jList[j].setSelected(true); jList[j].setClosed(true); } catch (Exception e1) { } break; } }
if (JOptionPane.showConfirmDialog (null, "This Scene may contain unsaved data.\nSave before closing?", "Unsaved Data", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) return;
            public void JSLFrameClosing(JSLFrameEvent e) {                if (!changed) return;                int i;                JSLFrame[] jList =JSLDesktop.getAllFrames();                for (int j=0;j<jList.length;j++) {                    if (jList[j] instanceof BankEditorFrame) {                        for (i=0;i<myModel.sceneList.size();i++)                            if (((BankEditorFrame)(jList[j])).bankData==((Scene)myModel.sceneList.get(i)).getPatch()) {				jList[j].moveToFront();				try {				    jList[j].setSelected(true);				    jList[j].setClosed(true);				} catch (Exception e1) {				}				break;			    }                    }                    if (jList[j] instanceof PatchEditorFrame) {                        for (i=0;i<myModel.sceneList.size();i++)                            if (((PatchEditorFrame)(jList[j])).p==((Patch)(myModel.sceneList.get(i)))) {				jList[j].moveToFront();				try {				    jList[j].setSelected(true);				    jList[j].setClosed(true);				} catch (Exception e1) {				}				break;			    }                    }                }                if (JOptionPane.showConfirmDialog(null,"This Scene may contain unsaved data.\nSave before closing?","Unsaved Data",JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) return;		moveToFront();		PatchEdit.saveFrame();            }