Java小程序与工具提示 [英] Java Applet with tooltip

查看:182
本文介绍了Java小程序与工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 JApplet的包含的JEditorPane 。在的JEditorPane 有一个与之关联的工具提示文本。第一次小程序加载时,提示正确地显示但之后,我在HTML页面中单击某处,applet的区域外,工具提示停止工作。我怀疑它与小程序失去焦点的事情。

I have a JApplet that contains a JEditorPane. The JEditorPane has a tooltip text associated with it. The first time the applet is loaded, the tooltip shows correctly but after I click somewhere in the HTML page, outside the applet's area, the tooltip stops working. I suspect it has to do with the applet losing focus.

有没有针对此问题的任何解决办法?

Is there any workaround for this problem?

最好的问候,

Best regards, Dan.

推荐答案

尝试(...)的HTML文档中,然后命名applet元素
使用JavaScript的onfocus发送浏览器焦点的元素。

Try "(...) naming the applet element within the html document and then using javascript onfocus to send the browser focus to the element."

来源: http://www.velocityreviews.com/forums/ t671396-applet的焦点issue.html

这篇关于Java小程序与工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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