Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Play Sound on GUI Step by Step Instructions Needed.

843802Jan 16 2010 — edited Jan 18 2010
I've made a GUI and want to play a sound in it. I've tried looking at a couple things and I haven't been able to get them to work. If someone could give me the code to do this:

1. Import sound from file (or add it somehow else, but that would probably be more complicated)
2. play song when play button is hit on JMenu
3. Song repeats if finished.

I already have the menu and the menuitem and everything. Please include where to place code.

Note: Using Netbeans and Windows 7

Edited by: Champachikla on Jan 17, 2010 2:31 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 15 2010
Added on Jan 16 2010
4 comments
1,861 views