我在网上下了个java录音的应用程序继承的Frame,我想改成Applet小程序程序继承Applet;然后嵌入网页中,怎么不可以?
请问要怎么改? 求高手指点!!!  部分代码如下:
public class audio extends Frame{
boolean stopCapture = false;       //控制录音标志    AudioFormat audioFormat;           //录音格式    //读取数据:从TargetDataLine写入ByteArrayOutputStream录音    ByteArrayOutputStream byteArrayOutputStream;    int totaldatasize = 0;    TargetDataLine targetDataLine;    //播放数据:从AudioInputStream写入SourceDataLine播放    AudioInputStream audioInputStream;    SourceDataLine sourceDataLine;    public audio() {        //创建按钮        final Button captureBtn = new Button("录音");        final Button stopBtn = new Button("停止");        final Button playBtn = new Button("播放");        final Button saveBtn = new Button("保存");        captureBtn.setEnabled(true);        stopBtn.setEnabled(false);        playBtn.setEnabled(false);        saveBtn.setEnabled(false);        //注册录音事件        captureBtn.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                captureBtn.setEnabled(false);                stopBtn.setEnabled(true);                playBtn.setEnabled(false);                saveBtn.setEnabled(false);                //开始录音                capture();            }        });