【问题标题】:JEditorPane doesn't want to show a button done in html (it shows in a browser)JEdi​​torPane 不想显示在 html 中完成的按钮(它显示在浏览器中)
【发布时间】:2012-06-11 22:03:57
【问题描述】:

我在 html 中创建了一个按钮并将其链接到另一个 html 文件,当我在浏览器中使用按钮打开文件(尝试 IE 和 FFox)时,按钮显示并正常工作,但是当我 JEditorPane.setPage(html带有按钮的文件)唯一显示的是按钮的名称,没有实际的可点击区域或任何东西!关于如何让按钮出现在窗格内的任何想法?

这是java框架中按钮的图片(按钮以红色圈出) http://tinypic.com/r/fopswo/6

这是浏览器中按钮的图片(它是一个按钮) http://tinypic.com/r/2zjj71z/6

按钮的代码

<font size = 12 face = "verdana" ><u> Creating An Account   </u></font> 
<span style="padding-left:360px"> </span>
<button onclick="window.location.href ='file:///F:/java 12/Isp/help file try/doc 2/test.html'">Back</button>

提前致谢

【问题讨论】:

    标签: java html button jeditorpane


    【解决方案1】:

    Swing 的 HTML 支持不完整——我认为您已经陷入其中的一个漏洞。更多信息在这里:

    Which HTML tags are supported in Swing components?

    【讨论】:

      猜你喜欢
      • 2011-05-07
      • 1970-01-01
      • 2019-06-01
      • 2013-04-14
      • 1970-01-01
      • 1970-01-01
      • 2013-02-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多