2008-12-12 45 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(); 
相关问题