2008-12-12 46 views

回答

1

您可以用AppletContext.showDocument()打開一個新窗口。您需要在服務器上使用HTML和全部頁面。你從applet獲得上下文,它從基類繼承getAppletContext()

它最終會看起來像這樣:

AppletContext ctxt = getAppletContext(); 
ctxt.showDocument("http://www.example.com/child_applet.html", "_top"); 

如果你只是想一個對外窗口,您可以創建並顯示一個框架。它將是小程序的一個子項,並受到相同的限制。而且,如果用戶離開小應用程序頁面,它將消失。

JFrame frame = new JFrame(); 
// setup all the context... 
frame.show(); 
相關問題