PatchEdit.desktop.getSelectedFrame().setClosed(true);
JFrame f = JSLDesktop.getSelectedWindow(); ((JSLFrame.JSLFrameProxy)f).getJSLFrame().setClosed(true);
	    public void actionPerformed(ActionEvent ex) {		try {		    PatchEdit.desktop.getSelectedFrame().setClosed(true);		} catch (Exception e) {		    if (PatchEdit.desktop == null) {			System.err.println("Error: No JSLDesktkop. Can't close"					   + " any windows.");		    } else if (PatchEdit.desktop.getSelectedFrame() == null) {			System.err.println("Error: No selected JSLFrame. " +					   "Can't close window.");		    } else {			e.printStackTrace();		    }		}	    }