+ // Creates and places components.
+ setLayout(new GridLayout(4,1));
+ setBorder(BorderFactory.createLineBorder(Color.black));
+
+ setPreferredSize(new Dimension(MooTrackView.VIEW_WIDTH,70));
+ title = new JTextField(trackName);
+ title.setFont(Moosique.getGUI().FONT);
+ title.addFocusListener(new TitleFocusListener());
+ add(title);
+
+ channelBox = new JComboBox();
+ channelBox.setFont(Moosique.getGUI().FONT);
+ for (int i = 1; i <= 16; i++)
+ channelBox.addItem(new Integer(i));
+
+ channelBox.setSelectedIndex(channel);
+
+ instruments = new MooInstrumentList(channelBox.getSelectedIndex());
+ add(instruments);
+
+ channelBox.addActionListener(new ActionListener(){
+ public void actionPerformed(ActionEvent e){
+ int chan = channelBox.getSelectedIndex();
+ MidiEvent me;
+ MooNote mn;
+ instruments.setChannel(channelBox.getSelectedIndex());
+ for (int j = 0; j < track.size(); j++) {
+ me = track.get(j);
+ if (me instanceof MooNote){
+ mn = (MooNote)me;
+ mn.setChannel(chan);
+ }
+ }}});
+ add(channelBox);
+
+ JPanel checkboxes = new JPanel();
+ checkboxes.setLayout(new GridLayout(1,3));
+