IPatch[] patarray = driver.createPatch((SysexMessage[]) queue .toArray(new SysexMessage[0]));
SysexMessage[] msgs = (SysexMessage[]) queue.toArray(new SysexMessage[0]); IPatch[] patarray = driver.createPatches(msgs);
    protected void pasteIntoSelectedFrame() {        if (sysexSize < 20)            return;        IPatchDriver driver = (IPatchDriver) driverComboBox.getSelectedItem();        IPatch[] patarray = driver.createPatch((SysexMessage[]) queue                .toArray(new SysexMessage[0]));        try {            PatchBasket frame = (PatchBasket) JSLDesktop.getSelectedFrame();            for (int i = 0; i < patarray.length; i++) {                frame.pastePatch(patarray[i]);            }        } catch (Exception ex) {            JOptionPane.showMessageDialog(null,                    "Library to Receive into must be the focused Window.",                    "Error", JOptionPane.ERROR_MESSAGE);        }    }