Playing sound files in Java Applications


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Playing sound files in Java Applications

Hybrid View

  1. #1
    A. Saffer Guest

    Playing sound files in Java Applications


    How do I play a sound file in a Java application? In applets, it's simple.
    But i can't get it to work in my application.

  2. #2
    zfq Guest

    Re: Playing sound files in Java Applications


    "A. Saffer" <apsaffer@hotmail.com> wrote:
    >
    >How do I play a sound file in a Java application? In applets, it's simple.
    >But i can't get it to work in my application.

    Since jdk1.2
    AudioClip clip = java.applet.Applet.newAudioClip(url);
    clip.play();
    clip.stop();
    clip.loop();


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center