你可以看看http://www.weblogic.com.cn:9080/bh/forum/view.jsp?id=0000000067&ZT=0000000008
这个站上有比较详细的解释
这个站上有比较详细的解释
解决方案 »
- 关于Thinking in java中作者自己定义的类
- vector 实现
- while 语句 i++和++i的问题
- 有哪位有导入导出xml文件的代码
- 大家来帮我看看这道题错在呢?
- 就是我有个mail收发程序,要求在windows,linux,unix上都能作为系统服务使用。就是说在用户登陆之前就在运行了,怎么做啊
- 请各位高手帮小弟看看这个读入一行输入,再输出的程序为什么不能编译呢?谢谢!在线等待!
- 【求助】各位大神!小弟新学java,第一个程序就老编译报错
- 请问在代码例子方面那本书写的比较好?
- Struts2中典型CRUD Action的抽象基类 怎么跳页面的??
- 将2004-9-11字符串转成java.util.Date类型呀
- 如何对成对的单词计数
import java.awt.event.*;
import java.applet.Applet;
import java.applet.AudioClip;public class PlayMedia extends Applet implements ActionListener
{
AudioClip audio;
Button btnPlay;
Button btnStop;
public void init()
{
btnPlay=new Button("Play");
btnStop=new Button("Stop");
add(btnPlay);
add(btnStop);
btnPlay.addActionListener(this);
btnStop.addActionListener(this);
try
{
audio=getAudioClip(getDocumentBase(),"1.au");
}
catch(Exception e)
{
System.out.println(e.toString());
}
}
public void actionPerformed (ActionEvent e)
{
if(e.getSource()==btnPlay)
{
try
{
audio.play ();
}
catch (Exception err)
{
System.out.println (err.toString ());
}
}
if(e.getSource()==btnStop)
{
try
{
audio.stop ();
}
catch (Exception err)
{
System.out.println (err.toString ());
}
}
}
}
怎么解决啊?
<html><head></head>
<body>
<applet code=PlayMedia.class width=300 height=300>
</applet>
</body>
</html>