Add sound to JFrame

I have a button in my JFrame and want to assign sound to it.
ActionListener code is already written, only the sound part is left.
Thanks for helping.(clear as you can get because im new in java)

At the beginning fo your action listener, try:
AudioClip audioClip = Applet.newAudioClip("C:\\temp\\sound1.wav");
audioClip.play();     //Play it once.This page shows you how to play sound so it loads faster.
http://java.sun.com/docs/books/tutorial/sound/playing.html

Similar Messages

  • Acrobat xi - RE: Add sound icon- skin displayed is a 'blank white box' until it is clicked to activate it- can you lock skin to display before its activated so that in a print run the skin shows up (ie the controls-or any kind of greyed out rectangle, lik

    Hi,
    Acrobat xi - RE: Add sound icon- skin displayed is a 'blank white box' until it is clicked to activate it- can you lock skin to display before its activated so that in a print run the skin shows up (ie the controls-or any kind of greyed out rectangle, like video controls before 1st activation) and not the blank white box- if no, I guess I have to activate all sound icons before doing a print run?thanks)).

    Many of your points are totally legitimate.
    This one, however, is not:
    …To put it another way, the design of the site seems to be geared much more towards its regular users than those the site is supposedly trying to "help"…
    The design and management of the forums for more than five years have driven literally dozens of the most valuable contributors and "regulars" away from the forums—permanently.
    The only conclusion a prudent, reasonable person can draw from this state of affairs is that Adobe consciously and deliberately want to kill these forums by attrition—without a the PR hit they would otherwise take if they suddenly just shut them down.

  • Looking for a simple app to add sound to my video...

    Hi,
    I've been trying to find a very simple app.  I want to add music (from my IPhone 4) to my own video (on my iPhone 4). 
    I'm pretty sure iMovie will do it, but it's 20MB and that's a lot of space for a lot of functionality that I don't want or need.
    Does anyone know a basic/simple app to add sound to my video???
    Thanks!
    Jim

    You're welcome.
    I can't even figure out how to do a search of the app store.
    From the App Store on your iPhone, press the Search button at the bottom and enter your search phrases.
    From a computer go here... http://appshopper.com/ and enter your search phrases
    FWIW, I used "video sound" to find your app.  It was the second hit.

  • How can I add sound to a single slide?

    I would like to add sound to a single slide so that it plays while the slide is being shown. Is there a way to do that in Lightroom 5?

    In Lightroom, you would have to create a slideshow using that one slide. Then you would add the sound to the slideshow.

  • Can i add sound to widget  repaso pictures?

    Hi i would like to add sound to my  ibooks widgets "repaso" in spanish pictures seleccion, How can i?

    function(){return A.apply(null,[this].concat($A(arguments)))}
    Marian Driscoll wrote:
    That's nifty for 50% of web users. 
    Well gee, I didn't intend for it to be a one size fits all browsers super page, just a small demo.
    And to make matters more interesting, while looking at the documentation I noticed Microsoft, with IE 9, is coming out with yet another new object, <audio>, to deal with sound.
    For what it's worth, in the browsers I tried it with (Safari, IE) I didn't hear any weird behavior on that "bird singing" page, linked above.  It did pop up a dialog from Safari telling me that QuickTime needed updating, though.  Apple software on a PC is almost like a virus. 
    -Noel

  • IMovie '09: I can't add sound files or voice recordings.

    I’ve been working on a project in iMovie (’09, version 8.0.6) for the past while, one which involves me importing external sound clips and recording my own voice. However, I went to work on my project again recently, only to discover that I can no longer add sound clips or record my own voice--attempting to do so will only result in iMovie getting stuck, leaving me with no option other then to force quit (which caused further problems I was only able to rectify by restoring an older version of the file from my backup drive). Additionally, certain other tasks run noticeably slower then usual (such changing the audio level on a sound clip); comparing the most recent version of my project to older versions (for clarification, these would be versions prior to the one I used to restore the file after the issues encountered with force-quitting), the older versions complete these tasks noticeably faster, and additionally don’t have any issues adding sound. The same goes for other unrelated projects, which appear to work even faster. What I want to know is, does it sound as if the issue is with a specific thing I’ve changed between my current version and my backups, or is it in general that the program’s just getting slower due to the increase in content? And, if it’s the latter, is there any way I can fix this?
    For reference, the issue does not appear to with the size of the file; another, unrelated, project of mine is twice the length and size of the one with issues, and yet it works perfectly fine.

    thank you, i tried them b4, not working.
    but now the problem solved. i did the following:
    1: change my itunes language settings back to english ( it was chinese b4)
    2: close itunes than re open it
    3: i downloaded a ringtone app on my iphone to allow me to customise the songs into ringtones on my iphone
    4: sync my iphone
    5: find the ringtones under my iphone's app in itunes sync
    6: copy the tones in my computer
    7:drag them back to my itunes ringtone lib,
    all done~~~~ it took a few step, but at least it worked.
    tried the change file format thing again, still not working

  • Can we add Sound files to Catalyst???

    quite simply can we add sound files to our catalyst projects?
    I would like to have a sound effect on rollover to certain part of the scene
    and I don't know if I am missing it but I don't see anywhere to add that functionality.

    Thanks for the reply
    and sorry for the Noob question
    but does that mean that sound is completely out of the question at this point?
    or is it something that a flex scripter can add with Flash Builder?
    I know a bit of Flash and a very little AS3
    but if Catalyst shapes into what it looks like it might
    it seems like I maybe should shift my energies over to Fb
    please let me know if sound is possible with some back-end action.

  • Droid 4 how do you add sounds for the alarm.

    How do you add sounds for the alarm on the Droid 4. I do not like any of the alarm clock sounds.

    In your internal storage of the phone, create a folder called alarms. Then copy or move the audio files to that folder.
    You might need to download a file explorer application from the Android Market.
    If the alarms in the root of storage doesn't work. Create a media folder, then a audio folder in that folder and then move the alarms folder in that folder.
    Or the simplest route, download the app called Ringdroid. You can use that application to set sounds as various ringtones types.

  • How to add sounds to Garageband on the ipad2?

    I was wondering how to add sound libraries to the ipad2. I am looking to use the ipad2 as a sound module so when I plug it up to my keyboard I can play any sound I want. I got the idea from a Jamal Hartwell Video.
    http://www.youtube.com/watch?v=iICtztPXqZA
    Starling
    http://www.StarlingJonesJr.com

    Tap on the Spanner icon, tap on Share and Print, Tap on Print.
    You will also need to have an Air-Print enabled printer and both the printer and ipad must be connected to the same network.  If your printer isn`t Air-Print enabled then there is a work-a-round but you will have to use google to obtain the files and instructions, do a search on google for Air-Print for PC or Air-Print for Mac.
    To save a document in Pages for iPad just tap on Documents to take you back to your list of documents and the one you are currently working on will automatically save, you can then tap on the documents name to change it.

  • HOW TO ADD SOUND

    any help will be greatly appreciated, thanks!!!
    jane again

    janemig wrote:
    > any help will be greatly appreciated, thanks!!!
    File - Import
    Than search HELP files for "add sound"
    Best Regards
    Urami
    Beauty is in the eye of the beer holder...
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • How to add sound effects to recorded sound?

    HI there
    I am making  an app which will record ur voice and then add sound effects to it. How can i add those sound effects such as a higher pitch

    Hi AhmadTheXboy,
    Actually this forum is to discuss the VS IDE usage, this issue would be related to the specific language development.
    Feng Chen shared us some samples here:
    How
    do I capture sound?
    The following threads is about the similar issue, they use the VB language in winform apps.
    How
    to add music and sound effects to a Windows Form Application?
    how
    to create sound recorder
    Hope they could provide useful information for you.
    If still no help, please select the correct language development forum here:
    http://social.msdn.microsoft.com/Forums/en-US/home?category=vslanguages&filter=alltypes&sort=lastpostdesc
    Sincerely,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • How to add sound to an application

    how would i add sounds such as 'well done' to an application that is designed for children.
    please could someone guide me as i dont have a clue of how to do this.

    I do it like this:
    sound = new Applet().newAudioClip(getClass().getResource("sound.mid"));of course that's limited to only .mid, .wav, and .au

  • How to add sound to a button in storyboards on xcode Version 4.6.2 (4H1003)?

    i am running xCode Version 4.6.2 (4H1003) on my macbook air with mountain lion.
    i am trying to add sound to a button that is in the scroll view but i cant?
    PLEASE I NEED HELP ASAP!!!

    Have you looked in the Attribute Inspector got the button? You can attach simple sounds to the button there,
    If you need more look at NSSound Class

  • How to add sound in each slide of powerpoint 2013

    Hi,
    I want to add sound in each slide of my powerpoint presentations in 2013.Please let us know how to do these things.
    Regards
    Pradeep

    Hi Pradeep,
    I would like to confirm that how exactly you want PowerPoint 2013 to play a sound. For example, add sound to your PowerPoint slide transitions, add background music, or play a sound during an Animation.
    To play a sound during a transition, go to the Transitions tab on the ribbon, apply a transition, then click the drop-down for
    Sound, and choose one from the list.
    To add audio in the background, you can go to the Insert tab on the ribbon and click the
    Audio button, choosing Online Audio... to search a clip media on Office.com or select a sound from your computer by selecting
    Audio on My PC...
    To add sound effects to an animation, you can refer to this article:https://support.office.com/en-us/article/Add-sound-effects-to-an-animation-7d0e2d70-caca-495e-a738-a8257474605e
    Hope it helps.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How to add sound to buttons in Xcode 5.0.1?

    hello
    i am wanting to know how to add sound to a button in xcode 5?
    its mover 200 sounds of like 1 sec.
    i am using storyboards
    i need it ASAP please tell me
    thanks alot

    That's the wrong file path. You want to go to the artwork and effects palette, find the layer styles section, and choose your style there.

Maybe you are looking for

  • Connecting my iPod 1st Gen to my 2011 Ford Explorer

    I have an iPod adapter that came with a more recent iPod Nano I purchased (late 2009) and tried hooking the 1st gen iPod Nano up to my new Ford last night. The car does not recognize my 1st gen iPod Nano, but does recognize the newer iPod Nano. Do I

  • SQL Developer 1.5 - Unable to Dock Help Window

    I'm running SQL Developer 1.5 on Windows 2000. In the previous version of SQL Developer, I was able to dock the Help window. In the current version, this does not appear to work. Is anyone else having this issue? Any suggestions?

  • Nokia E5 Light sensor bugs/problems SW: v042.010 (...

    Hello nokia support! I have buy my new Nokia E5 in Germany VODAFONE.DE and, I just wont report about, bug wich ligt sensor in firmware  v042.010.RM-612 Please See my recorded video on youtube VIDEO i hope that you fix this bug wich new firmware versi

  • RATE ROUTING - URGENT

    Hi all,      I know the functions of rate routing. it is used in REM. Why this only used in REM? What is the speciality? In Rate routing wat is the meaning of RATE? What is the main difference b/w std & Rate? I already studied all threads abt the rat

  • Link to a page item

    Hi Friends, I have a three page item which is in display only manner........ These are the three page items, *) Business Trip Request *) Salary Certificate Request *) Business Card Request For these three items, i have given(in this case i have show