有没有办法重新加载/从applet本身刷新的Java小程序? [英] Is there a way to reload/refresh a java applet from within the applet itself?

查看:239
本文介绍了有没有办法重新加载/从applet本身刷新的Java小程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的小程序(包含在一个浏览器)一个按钮,我想提出的重载或刷新整个小程序的两种方法之一:

I have a button on my applet (contained in a browser) that I would like to make reload or refresh the entire applet one of two ways:


  1. 刷新小程序本身,而无需刷新浏览器

  2. 刷新整个浏览器

从applet中这可能吗?

Is this possible from within the applet?

推荐答案

使用的AppletContext.showDocument(...)方法:

Use the AppletContext.showDocument(...) method:

applet.getAppletContext().showDocument(applet.getDocumentBase(), "_self")

这将加载包含在同一个窗口中applet的文档/帧的小程序已经加载

That will load the document containing the applet in the same window/frame the applet is already loaded in.

这篇关于有没有办法重新加载/从applet本身刷新的Java小程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆