FileDocCategorySizeDatePackage
MiniMusicService.javaAPI DocExample3344Sun Jan 23 20:29:00 GMT 2005None

MiniMusicService

public class MiniMusicService extends Object implements Service

Fields Summary
MyDrawPanel
myPanel
Constructors Summary
Methods Summary
public javax.swing.JPanelgetGuiPanel()

       
       JPanel mainPanel = new JPanel();
       myPanel = new MyDrawPanel();
       JButton playItButton = new JButton("Play it");
       playItButton.addActionListener(new PlayItListener());
       mainPanel.add(myPanel);
       mainPanel.add(playItButton);
       return mainPanel;
   
public javax.sound.midi.MidiEventmakeEvent(int comd, int chan, int one, int two, int tick)

          MidiEvent event = null;
          try {
            ShortMessage a = new ShortMessage();
            a.setMessage(comd, chan, one, two);
            event = new MidiEvent(a, tick);
            
          }catch(Exception e) { }
          return event;