Java - How To Play .wav & show .jpg on screen...

Discussion in 'Software' started by TR15220, Feb 2, 2006.

  1. TR15220

    TR15220 Private First Class

    I'm trying to play a .wav file in an Application.
    ---------------------------------------------------
    AudioClip sound;

    sound = getAudioClip(getCodeBase(), "tune.wav");
    sound.play();

    ----------------------------------------------------

    Should it be:

    sound = getAudioClip(getDocumentBase(), "tune.wav");

    Doesn't seem to work - Is this for an Applet only?

    And do I have to assign the .jpg to a label object?

    If anyone has 3-5 lines of code to handle these two I would definitely appreciate it!!!
     
  2. QuickSilver

    QuickSilver Corporal

    Hmmm I'm thinking that AudiClip is an Applet class... I'm not sure off hand what the application equivalent is...
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds