* Creates the title bar.
*/
public MooTrackTitle () {
- setLayout(new GridLayout(1,3));
+ setLayout(new GridLayout(2,2));
instruments = new MooInstrumentList();
add(instruments);
channel = new JComboBox();
- for (int i = 0; i < 16; i++)
+ for (int i = 1; i <= 16; i++)
channel.addItem(new Integer(i));
channel.addItemListener(new ItemListener(){
public void itemStateChanged(ItemEvent e){
- if (e.getStateChange() != e.SELECTED)
- return; //return if this even isn't the selection event.
-
- Object ob = e.getItem();
+ Object ob = channel.getSelectedItem();
if (ob instanceof Integer){
//set channel
}