I have one Button on my Applet and I want that when I click on Button audio file MySound.wav will play. I am using AWT for creating applet.
Printable View
I have one Button on my Applet and I want that when I click on Button audio file MySound.wav will play. I am using AWT for creating applet.
Do you have documentation for the Applet class? Read about the getAudioClip() method. And also see the AudioClip class.
The JVM doesn't support all formats of Audio files. Read the doc for your JVM to see which it will play.
Norm