cbDriver.addItemListener (new ItemListener () { public void itemStateChanged (ItemEvent e) { if (e.getStateChange ()==ItemEvent.SELECTED) { System.out.println("itemStateChanged"); midiDriverSelected((MidiWrapper) ((JComboBox)e.getSource()).getSelectedItem()); } } }); channelPanel = new JPanel(); channelPanel.setLayout(new core.ColumnLayout());
}); channelPanel = new JPanel(); channelPanel.setLayout(new core.ColumnLayout());
	public MidiConfigPanel(AppConfig appConfig) {		super(appConfig);		currentDriver = null;		driverChangeListeners = new Vector();		midiImps = MidiWrapper.getSuitableWrappers(); 		setLayout (new core.ColumnLayout ());        JLabel l2 = new JLabel ("MIDI Access Method:");        add (l2);		cbDriver=new JComboBox ();		add (cbDriver);		// Fill the combo box with all Midi wrappers in the midiimps vector		for(int i=0; i<midiImps.size(); i++) {			cbDriver.addItem(midiImps.elementAt(i));		}		cbDriver.addItemListener (new ItemListener () {			public void itemStateChanged (ItemEvent e) {				if (e.getStateChange ()==ItemEvent.SELECTED) {					System.out.println("itemStateChanged");					midiDriverSelected((MidiWrapper) ((JComboBox)e.getSource()).getSelectedItem());				}			}		});		channelPanel = new JPanel();		channelPanel.setLayout(new core.ColumnLayout());        JLabel l0=new JLabel ("Run Startup Initialization on Midi Ports:");        channelPanel.add (l0);        cb1 = new JComboBox ();        cb2 = new JComboBox ();        cb3 = new JComboBox ();        channelPanel.add (cb1);        channelPanel.add (cb2);                JLabel l1=new JLabel ("Receive from Master Controller on Midi Port:");        channelPanel.add (l1);        channelPanel.add (cb3);        add(channelPanel);        JButton testButton = new JButton("Test Midi");		testButton.addActionListener (new ActionListener () {			public void actionPerformed (ActionEvent e) {				MidiTest.runLoopbackTest(currentDriver, cb2.getSelectedIndex(), cb1.getSelectedIndex());			}		});		add(testButton);                        init();	}