I have made a Java MIDI example with JDK1.3
It is a little organ. In my case it sends MIDI commands to my synthesizer.
It has a combobox in which you can choose an instrument, and the letters C,
C#, D, D#, etc. If you press the mouse button on it you hear a tone, until
you release it, in which case the synthesizer stops playing it.
It is at:
Hans Kamp (Win2000)