0

I need a .wav file to loop while a Canvas contained in a JFrame is opened, and stop when closed. I tried looking around but nothing seems to work, is there any way to do this with Clip? Can anyone giving me a simple example? Thank you very much.

EDIT: I know how to loop a Clip file or play it once, it just doesn't stop when the frame is closed, it keeps looping.

Bianca
  • 149
  • 2
  • 10
  • possible duplicate of [Playing .mp3 and .wav in Java?](http://stackoverflow.com/questions/6045384/playing-mp3-and-wav-in-java) –  Apr 23 '15 at 13:05
  • http://www.javaworld.com/article/2077521/learn-java/java-tip-24--how-to-play-audio-in-applications.html or http://stackoverflow.com/questions/6045384/playing-mp3-and-wav-in-java –  Apr 23 '15 at 13:06

0 Answers0