Java examples for javax.sound.sampled:Sound
The music needs to be stopped to play other sounds like right or wrong
//package com.java2s; import java.applet.AudioClip; public class Main { static AudioClip gameClip, rightClip, wrongClip; /**/* www.j av a2 s . c o m*/ * The music needs to be stopped to play other sounds like right or wrong */ static void stopGameMusic() { try { gameClip.stop(); } catch (Exception e) { System.out.println("stopGameMusic caught exception" + e.getMessage()); } } }