addWidget(cmnPane,new PatchNameWidget(" Name  ", patch, ((Driver) patch.getDriver()).getPatchNameSize()),0,0,18,1,0);
addWidget(cmnPane,new PatchNameWidget(" Name  ", patch),0,0,18,1,0);
  public AlesisDMProDrumKitEditor(Patch patch)  {    super ("Alesis DM Pro Drumkit Editor",patch);    //All widgets need a ref to parser, it handles access to patchsysex    AlesisDMProParser oParser = new AlesisDMProParser(patch);    String[] arType = new String[]{" AKk ", " EKk ", " ASn ", " ESn ", " TOM ", " HAT ", " CYM ", " AP1 ", " AP2 ", " EPc ", " SFx ", " CHR ", " USR "};    String[] arDrum = new String[] {"0","1","2","3","4","5","6","7","8","9",                                    "10","11","12","13","14","15","16","17","18","19",                                    "20","21","22","23","24","25","26","27","28","29",                                    "30","31","32","33","34","35","36","37","38","39",                                    "40","41","42","43","44","45","46","47","48","49",                                    "50","51","52","53","54","55","56","57","58","59",                                    "60","61","62","63","64","65","66","67","68","69",                                    "70","71","72","73","74","75","76","77","78","79",                                    "80","81","82","83","84","85","86","87","88","89",                                    "90","91","92","93","94","95","96","97","98","99",                                    "100","101","102","103","104","105","106","107","108","109",                                    "110","111","112","113","114","115","116","117","118","119",                                    "120","121","122","123","124","125","126","127"};    String[] arOutput = new String[] {"Main L/R", "Aux 1/2", "Aux 3", "Aux 4", "FX Only"};    String[] arFXBus = new String[] {"Reverb", "OD->DL->PCH"};    String[] arMuteGroup = new String[] {"OFF", "Group 1", "Group 2", "Group 3", "Group 4"};    String[] arMIDIChannel = new String[] {"Basic", "ch 1",  "ch 2", "ch 3", "ch 4", "ch 5", "ch 6", "ch 7", "ch 8", "ch 9", "ch 10", "ch 11", "ch 12", "ch 13", "ch 14", "ch 15", "ch 16"};    String[] arDrumLink = new String[65];    String[] arPan = new String[] {"<3", "<2", "<1", "<>", "1>", "2>", "3>", "PRG"};    // Common Pane    JPanel cmnPane=new JPanel();    cmnPane.setLayout(new FlowLayout());    addWidget(cmnPane,new PatchNameWidget(" Name  ", patch, ((Driver) patch.getDriver()).getPatchNameSize()),0,0,18,1,0);    gbc.gridx = 0;    gbc.gridy = 0;    scrollPane.add(cmnPane, gbc);    arDrumLink[0] = "Off";    gbc.weightx = 0;    gbc.weighty = 0;    int nStartByte = 44;   for (int i = 0; i < 64;i++) {        //For each drum        JPanel pnlDrum = new JPanel();        JLabel lblHeader = new JLabel("Drum " + (i+33));        pnlDrum.add(lblHeader, gbc);        pnlDrum.setLayout(new GridBagLayout());        pnlDrum.setBorder(new EtchedBorder(EtchedBorder.LOWERED));        ComboBoxWidget cboDrum = new ComboBoxWidget("Drum", patch,                           new AlesisDMProModel(oParser, nStartByte + 0, 0, 7),                           new AlesisDMProSender(i, 0, 1),                           arDrum);        //The drums list depends on the category combo...        BuddyCombo cboCat = new BuddyCombo("Category", patch,                           new AlesisDMProModel(oParser, nStartByte + 0, 7, 5),                           new AlesisDMProSender(i, 0, 0),                           arType, cboDrum.cb);        addWidget(pnlDrum, cboCat, 1, 0, 2, 1, i);        addWidget(pnlDrum, cboDrum, 1, 1, 2, 1, 0);        addWidget(pnlDrum, new ComboBoxWidget("Output", patch,                           new AlesisDMProModel(oParser, nStartByte + 2, 7, 3),                           new AlesisDMProSender(i, 2, 2),                           arOutput), 1, 2, 2, 1, 0);        addWidget(pnlDrum, new ComboBoxWidget("Effect bus", patch,                           new AlesisDMProModel(oParser, nStartByte + 4, 1, 1),                           new AlesisDMProSender(i, 2, 4),                           arFXBus), 3, 0, 2, 1, 0);        addWidget(pnlDrum, new ComboBoxWidget("Mute group", patch,                           new AlesisDMProModel(oParser, nStartByte + 5, 2, 3),                           new AlesisDMProSender(i, 2, 5),                           arMuteGroup), 3, 1, 2, 1, 0);        addWidget(pnlDrum, new ScrollBarLookupWidget("Pan", patch, 0, 7,                           new AlesisDMProModel(oParser, nStartByte + 2, 4, 3),                           new AlesisDMProSender(i, 2, 1), arPan), 3,2,2,1, 0);        addWidget(pnlDrum, new ScrollBarWidget("Effect level", patch, 0, 99, 0,                           new AlesisDMProModel(oParser, nStartByte + 3, 2, 7),                           new AlesisDMProSender(i, 2, 3)), 5,0,3,1, 0);        addWidget(pnlDrum, new ScrollBarWidget("Volume", patch, 0, 99, 0,                           new AlesisDMProModel(oParser, nStartByte + 1, 5, 7),                           new AlesisDMProSender(i, 2, 0)), 5,1,3,1, 0);        addWidget(pnlDrum, new ScrollBarWidget("Pitch", patch, -96, 96, 0,                           new AlesisDMProModel(oParser, nStartByte + 4, 2, 8),                           new AlesisDMProSender(i, 1, 0)), 5,2,3,1, 0);        addWidget(pnlDrum, new CheckBoxWidget("MIDI In", patch,                           new AlesisDMProModel(oParser, nStartByte + 5, 5, 1),                           new AlesisDMProSender(i, 3, 14)), 8,0,1,1, 0);        addWidget(pnlDrum, new CheckBoxWidget("MIDI Out", patch,                           new AlesisDMProModel(oParser, nStartByte + 5, 6, 1),                           new AlesisDMProSender(i, 3, 15)), 8,1,1,1, 0);        addWidget(pnlDrum, new CheckBoxWidget("Enable", patch,                           new AlesisDMProModel(oParser, nStartByte + 1, 4, 1),                           new AlesisDMProSender(i, 2, 7)), 8,2,1,1, 0);        addWidget(pnlDrum, new ComboBoxWidget("MIDI Channel", patch,                           new AlesisDMProModel(oParser, nStartByte + 5, 7, 5),                           new AlesisDMProSender(i, 3, 13),                           arMIDIChannel), 9, 0, 2, 1, 0);        addWidget(pnlDrum, new ComboBoxWidget("Drum link", patch,                           new AlesisDMProModel(oParser, nStartByte + 6, 4, 7),                           new AlesisDMProSender(i, 2, 6),                           arDrumLink), 9, 1, 2, 1, 0);        gbc.gridx=0;        gbc.gridy=i+1;        scrollPane.add(pnlDrum, gbc);        nStartByte += 8;   }    pack();    show();  }