FileDocCategorySizeDatePackage
NoisyButton.javaAPI DocExample447Wed Mar 26 02:44:04 GMT 1997None

NoisyButton

public class NoisyButton extends Applet implements ActionListener

Fields Summary
AudioClip
sound
Constructors Summary
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent e)

		if ( sound != null )
			sound.play();
	
public voidinit()

		sound = getAudioClip( getClass().getResource(getParameter("sound")) );
		Button button = new Button("Play Sound");
		button.addActionListener( this );
		add ( button );