I adapted a musicplayer class from http://stackoverflow.com/questions/4875080/music-loop-in-java for use in my own program, but I have run into a weird problem. I have a button to start and stop the music,
and if I click it once, the music starts correctly and the program continues to run just fine. If i click it again, the music stops and the program stays fine. The problem occurs when I click the button a third time.
The music will start playing as it should, but the rest of the program stops responding. Here is what I have in the MusicPlayer class.