I've created a desktop application using Groovy and SwingBuilder. I would like to add sound effects to my app. How can I do that ?
Thank you...
I've created a desktop application using Groovy and SwingBuilder. I would like to add sound effects to my app. How can I do that ?
Thank you...
There is nothing specific in groovy that you could use to add sound effect. Instead just use the existing Java libraries like this:
import sun.audio.*;
import java.io.*;
AudioStream as = new AudioStream(new FileInputStream(Filename));
AudioPlayer.player.start(as);
Encapsulate this code in a separate class and call it from your groovy application.