I have a frame which pops up whenever an event occurs.
Whenever that frame pops up, I want a sound to be played.
How can I do that in Swing?
I have a frame which pops up whenever an event occurs.
Whenever that frame pops up, I want a sound to be played.
How can I do that in Swing?
Check this question in this same site: How can I play sound in Java?
Subclass JDialog or similar and on the constructor/setVisible method of the derived class play a sound with one of the fore mentioned methods.