Java小程序与工具提示 [英] Java Applet with tooltip
问题描述
我有一个 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屋!