public void putPatch(Patch bank, Patch p, int patchNum) {
public void putPatch(IPatch b, IPatch p, int patchNum) { Patch bank = (Patch)b;
  public void putPatch(Patch bank, Patch p, int patchNum) {    if (!canHoldPatch(p)) {      JOptionPane.showMessageDialog(null, "This type of patch does not fit in to this type of bank.","Error", JOptionPane.ERROR_MESSAGE);      return;    }    // Update index    generateIndex(bank);    // Find next existing patch in bank, this gives us the index at which the data needs to be inserted    int nextPatchNum = patchNum;    while(patchIndex[nextPatchNum] == 0)      nextPatchNum++;    System.out.println("Insert at patchNum: " + nextPatchNum + " | index: " + patchIndex[nextPatchNum]);    //  p.sysex <DATA> starts at 9, ends just before trailing F7    bank.sysex = Utility.byteArrayReplace(bank.sysex, patchIndex[nextPatchNum], patchSize(bank, patchNum), p.sysex, 9, p.sysex.length - 10);    // Update index and checksum    indexedPatch = null;    setPatchExists(bank, patchNum, true);    generateIndex(bank);    calculateChecksum(bank);  }