*/
public void setTracks(Track[] tracks) {
numberOfTracks = tracks.length;
+ trackPanel.removeAll();
+ titlePanel.removeAll();
if (numberOfTracks == 1) {
// If MIDI file is of type 0, creates a view for the track.
+ trackPanel.setLayout(new FlowLayout());
trackPanel.add(new MooTrackView(tracks[0]));
titlePanel.add(new MooTrackTitle(tracks[0]));
} else {
progressDialog.setVisible(true);
// Starts filling the track panel with track views, while updating the progress bar.
- trackPanel.removeAll();
trackPanel.setLayout(new GridLayout(1,numberOfTracks));
for (int i = 1; i < tracks.length; i++) {
trackPanel.add(new MooTrackView(tracks[i]));