import java.applet.*;
import javax.swing.*;
import java.awt.event.*;

/*
<APPLET code="soundApplet.class" width = 300 height = 300>
</APPLET>
*/

public class soundApplet extends JApplet
{
    AudioClip clip;                                   
    JButton button;

    public void init()
    {
        clip = getAudioClip(getDocumentBase(), "tada.wav");

        button = new JButton("Play sound");
        getContentPane().add(button);

        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e){clip.loop();}});

  }
}
