addWidget(panel, new PatchNameWidget("Name", p, ((Driver) p.getDriver()).getPatchNameSize()),slidercount++);
addWidget(panel, new PatchNameWidget("Name", p),slidercount++);
    public GeneralPanel () {      super();      setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) );      Container c;      Container row = Box.createHorizontalBox();      add(row);      panel = new ControlPanel("Name");      row.add(panel);      addFiller(row, 5, 0);      // Add an action listener to update the name, or do one ourselves.      //panel = Box.createHorizontalBox();      //c.add(panel);      addWidget(panel, new PatchNameWidget("Name", p, ((Driver) p.getDriver()).getPatchNameSize()),slidercount++);      //addHGlue();      //panel = Box.createHorizontalBox();      //c.add(panel);      ComboBoxWidget cat, sub;      cat =	addCombo("Category", 0x40700C,		  new String[] {"--","A. Piano","Keyboard","Organ","Guitar",				"Bass","Strings","Brass","Reed/Pipe",				"Synth Lead","Syn Pad/Choir","Synth Comp",				"Chromatic Perc","Drum/Perc","Sound FX",				"Musical FX","Combination"});      //addHGlue();      //panel = Box.createHorizontalBox();      //c.add(panel);      sub = addCombo("Subcategory", 0x40700D,new String[] {"--"});      cat.addEventListener( new CategoryActionListener(cat, sub) );      //addHGlue();      //addVGlue(c);      c = new ControlPanel("Poly Mode");      row.add(c);      panel = Box.createHorizontalBox();      c.add(panel);      addCombo("",0x400003,new String[]{"Mono","Poly"});      addHGlue();      addCombo("Note Mode",0x400002, new String[]{"Single","Multi"});      panel = Box.createHorizontalBox();      c.add(panel);      addCombo("Tuning",0x400004,	       new String[] { "Equal Temp","Pure Major C","Pure Major C#",			      "Pure Major D","Pure Major D#","Pure Major E",			      "Pure Major F","Pure Major F#","Pure Major G",			      "Pure Major G#","Pure Major A","Pure Major A#",			      "Pure Major B","Pure Minor A","Pure Minor A#",			      "Pure Minor B","Pure Minor C","Pure Minor C#",			      "Pure Minor D","Pure Minor D#","Pure Minor E",			      "Pure Minor F","Pure Minor F#","Pure Minor G",			      "Pure Minor G#","Werkmeister","Kirnberger",			      "Vallotti & Young","1/4 Shifted","1/4 Tone",			      "1/8 Tone","Indian"});      addHGlue();      addVGlue(c);      addHGlue(row);      row = Box.createHorizontalBox();      add(row);      c = new ControlPanel("Portamento");      row.add(c);      addFiller(row, 5, 0);      panel = Box.createHorizontalBox();      c.add(panel);      addCombo("",0x400008, new String[] {"Off","On"});      addHGlue();      panel = Box.createHorizontalBox();      c.add(panel);      addSlider("Time", 0x400009, 0, 0x7f);      addHGlue();      panel = Box.createHorizontalBox();      c.add(panel);      addCombo("Mode",0x400007, new String[]{"Legato","Always"});      addHGlue();      addCombo("Time Mode",0x40000A,new String[]{"Rate","Time"});      addHGlue(row);      row = new ControlPanel("Quick Edit");      add(row);      addHGlue(row);      c = new ControlPanel("Output");      row.add(c);      addFiller(row, 0, 5);      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Volume", 0x400001, 0, false,  0, 0x7f, 0);      addLabeledSlider("Pan", 0x407025, 0, false, 1, 0x7f, -64);      //addHGlue();      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Chorus Send", 0x40000C, 0, false, 0, 0x7f, 0);      addLabeledSlider("Reverb Send", 0x40000B, 0, false, 0, 0x7f, 0);      //addHGlue();      c = new ControlPanel("Master EQ Offsets");      row.add(c);      addFiller(row, 0, 5);      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Low", 0x407031,0, false, 0, 127, -64);      addLabeledSlider("Low Mid", 0x407032,0, false, 0, 127, -64);      //addHGlue();      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("High Mid", 0x407033,0, false, 0, 127, -64);      addLabeledSlider("High", 0x407034,0, false, 0, 127, -64);      //addHGlue();      c = new ControlPanel("Amp EG Offsets");      row.add(c);      panel = Box.createHorizontalBox();      c.add(panel);      addFiller(c, 0, 5);      addLabeledSlider("Attack",0x407039,0, false, 0,0x7f,-64);      addLabeledSlider("Decay",0x407027,0, false, 0, 0x7f, -64);      //addHGlue();      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Sustain", 0x407028,0, false, 0, 0x7f, -64);      addLabeledSlider("Release", 0x40703a,0, false, 0, 0x7f, -64);      //addHGlue();      c = new ControlPanel("Filter EG Offsets");      row.add(c);      addFiller(row, 0, 5);      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Attack",0x407029,0, false, 0,0x7f,-64);      addLabeledSlider("Decay",0x40702A,0, false, 0, 0x7f, -64);      //addHGlue();      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Release", 0x40703a,0, false, 0, 0x7f, -64);      addLabeledSlider("Depth", 0x40702D,0, false, 0, 0x7f, -64);      //addHGlue();      c = new ControlPanel("Assignable Knobs");      row.add(c);      addFiller(row, 0, 5);      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Knob A", 0x40702e,0, false, 0, 127, -64);      addLabeledSlider("Knob B", 0x40702f,0, false, 0, 127, -64);      //addHGlue();      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Knob 1", 0x407035,0, false, 0, 127, -64);      addLabeledSlider("Knob 2", 0x407036,0, false, 0, 127, -64);      //addHGlue();      c = new ControlPanel("Misc.");      row.add(c);      addFiller(row, 0, 5);      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Filter Cutoff Offset",0x407037,0, false, 0, 0x7f, -64);      addLabeledSlider("Resonance Offset", 0x407038,0, false, 0, 0x7f, -64);      //addHGlue();      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Chorus Send Offset", 0x407026, 0, false, 0, 0x7f, -64);      addLabeledSlider("Pitch Bend Upper Range",0x400005,0,false,0x10,0x58,-64);      //addHGlue();      panel = Box.createHorizontalBox();      c.add(panel);      addLabeledSlider("Pitch Bend Lower Range",0x400006,0,false,0x10,0x58,-64);      addCombo("Default Knob Mode", 0x407024, new String[] {"Pan & Send","Tone",							    "Assign",							    "M EQ Offset"});      //addHGlue();    }