byte [] mySysex = new byte[myPatch.sysex.length]; System.arraycopy(myPatch.sysex,0,mySysex,0,myPatch.sysex.length); if (table.getSelectedRowCount()==0) myModel.PatchList.add(new Patch(mySysex, myPatch.deviceNum, myPatch.driverNum, myPatch.date.toString(), myPatch.author.toString(), myPatch.comment.toString())); else myModel.PatchList.add(table.getSelectedRow(), new Patch(mySysex, myPatch.deviceNum, myPatch.driverNum, myPatch.date.toString(), myPatch.author.toString(), myPatch.comment.toString()));
if (table.getSelectedRowCount()==0) myModel.PatchList.add((Patch) myPatch.clone()); else myModel.PatchList.add(table.getSelectedRow(), (Patch) myPatch.clone());
    public void PastePatch()    {        Patch myPatch=PatchEdit.Clipboard;	//System.out.println("Paste "+myPatch);        if (myPatch!=null)        {            byte [] mySysex = new byte[myPatch.sysex.length];            System.arraycopy(myPatch.sysex,0,mySysex,0,myPatch.sysex.length);            if (table.getSelectedRowCount()==0)                myModel.PatchList.add(new Patch(mySysex,						myPatch.deviceNum,						myPatch.driverNum,						myPatch.date.toString(),						myPatch.author.toString(),						myPatch.comment.toString()));            else                myModel.PatchList.add(table.getSelectedRow(),				      new Patch(mySysex,						myPatch.deviceNum,						myPatch.driverNum,						myPatch.date.toString(),						myPatch.author.toString(),						myPatch.comment.toString()));            changed=true;            myModel.fireTableDataChanged();        //    statusBar.setText(myModel.PatchList.size()+" Patches");        }    }