帮忙看一下这个程序错在哪了
我就是想点了yes之后,能打开百度这个网页
但是点了之后却没有任何反应import java.applet.*;
import java.awt.*;
import java.net.*;import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;public class MyTry extends Applet implements ActionListener { String str;
Button b;
URL url;
public void init() {
str = "http://www.baidu.com";
try{
url = new URL(str);
}
catch(Exception e){}

b = new Button("yes");
b.addActionListener(this);
add(b);
}
public void actionPerformed(ActionEvent arg0) {
// TODO Auto-generated method stub
if(arg0.getActionCommand().equals("yes"))
{
getAppletContext().showDocument(url);
}
}}