((PatchBasket) JSLDesktop.getSelectedFrame()).PastePatch(np.getNewPatch());
Patch p = np.getNewPatch(); if (p != null) ((PatchBasket) JSLDesktop.getSelectedFrame()).PastePatch(p);
        public void actionPerformed(ActionEvent e) {            try {		NewPatchDialog np = new NewPatchDialog(PatchEdit.getInstance());		np.setVisible(true);		((PatchBasket) JSLDesktop.getSelectedFrame()).PastePatch(np.getNewPatch());	    } catch (Exception ex) {		ErrorMsg.reportError("Error", "Unable to create this new patch.", ex);	    }        }