X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=MooInstrumentList.java;fp=MooInstrumentList.java;h=8f1afcb4728b25a92ec6103a41eb84405c0999d4;hb=ae45edfc5dff1e0a098df4afe747a2dec6c90362;hp=88903e039eb838360a771b3129d3201819052f74;hpb=c042cd1b86ce2f107f9e102bada7e999b13a960d;p=moosique.git diff --git a/MooInstrumentList.java b/MooInstrumentList.java index 88903e0..8f1afcb 100644 --- a/MooInstrumentList.java +++ b/MooInstrumentList.java @@ -12,9 +12,10 @@ import java.awt.event.*; public class MooInstrumentList extends JComboBox implements ActionListener { protected int channel; - public MooInstrumentList(int chan) { + + public MooInstrumentList(int instrument) { super(instruments); - setChannel(chan); + setSelectedIndex(instrument); setFont(new Font("Helvetica", Font.PLAIN, 10)); addActionListener(this); } @@ -23,6 +24,7 @@ public class MooInstrumentList extends JComboBox implements ActionListener { channel = chan; setSelectedIndex(Moosique.getChannel(chan).getProgram()); } + public void actionPerformed(ActionEvent e) { JComboBox box = (JComboBox)e.getSource(); int instrument = box.getSelectedIndex();