• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble restarting music  RSS feed

Leonard Connoway
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

and here is the button that controls the music

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!