/**
* @(#)play_wav .java
*
*
* @author anant
* @version 1.00 2013/12/28
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.applet.*;
class play_wav
{
public static void main(String args[])
{
myframe m=new myframe();
m.setTitle("Play Sound");
m.setSize(500,500);
m.setVisible(true);
m.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
class myframe extends JFrame
{
myframe()
{
try
{
File WaveFile=new File("Phoolon Jaisi.wav");
AudioClip Sound;
Sound=Applet.newAudioClip(WaveFile.toURL());
Sound.play();
}
catch(Exception e)
{
System.out.println(e);
}
}
}
* @(#)play_wav .java
*
*
* @author anant
* @version 1.00 2013/12/28
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.applet.*;
class play_wav
{
public static void main(String args[])
{
myframe m=new myframe();
m.setTitle("Play Sound");
m.setSize(500,500);
m.setVisible(true);
m.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
class myframe extends JFrame
{
myframe()
{
try
{
File WaveFile=new File("Phoolon Jaisi.wav");
AudioClip Sound;
Sound=Applet.newAudioClip(WaveFile.toURL());
Sound.play();
}
catch(Exception e)
{
System.out.println(e);
}
}
}
No comments:
Post a Comment