import java.awt.*;
import javax.swing.*;  //  少了一个x;
import java.net.*;
public class t1{
JFrame jF;
URL url;
JEditorPane html;
public static void main(String a[]) throws Exception{
t1 t=new t1();
t.go();
}
public void go() throws Exception{
jF=new JFrame("My Browser");
Container mm=jF.getContentPane();
url=new URL("http://www.google.com");
html=new JEditorPane(url);
mm.add(html);
jF.setSize(500,500);
jF.setVisible(true);
}
//}    // 多了一个分号;
}

解决方案 »

  1.   

    import java.awt.*;
    import javax.swing.*;
    import java.net.*;
    public class t1{
    JFrame jF;
    URL url;
    JEditorPane html;
    public static void main(String a[]) throws Exception{
    t1 t=new t1();
    t.go();
    }
    public void go() throws Exception{
    jF=new JFrame("My Browser");
    Container mm=jF.getContentPane();
    url=new URL("http://www.google.com");
    html=new JEditorPane(url);
    mm.add(html);
    jF.setSize(500,500);
    jF.setVisible(true);}
    }
    上楼的没错