做个lable,显示网址
try {
 getAppletContext().showDocument(new URL(getCodeBase()+"redirect.jsp?"+url),"_blink");
}
在服务器接收网址,再redirect到那个url上。

解决方案 »

  1.   


    我是这样写的
    public void mouseClicked(java.awt.event.MouseEvent e) {
    java.applet.Applet A = new Applet();
    if ((e.getSource() == getButton1()) ) 
    {
    try
    {
    A.getAppletContext().showDocument(new URL("http://hill.533.net"));
    }
    catch(MalformedURLException urlException)
    {
    System.out.println("Sorry but there was an error creating the URL:"+urlException);
    }
    }
    其中button1是一个按钮(当单击这个按钮时应该连接到所要求的地址),但结果是竟然毫无反映,不知什么原因。
      

  2.   

    applet只能访问与它所在的服务器!!
    我上边说了,在服务器上做个cgi,接收你的访问网址,再在服务器端redirect到那个网址上。