关于URL
public class ShowDocument extends JApplet{
public void init(){
JButton goButton = new JButton("Link to www.);
Container myContainer = getContentPane();
myContainer.add(new JLabel("Link to SOHU"),BorderLayout.NORTH);
}
class ButtonListener implements ActionListener{
public void actionPerformed(ActionEvent e){
try{
URL newDocument = new URL("http://www.);
AppletContext brower = getAppletContext();
brower.showDocument(newDocument);
}catch(Exception e1){
希望各位朋友帮忙解释一下这段代码的功能。谢谢
}
}
}
}