我有一个小的(500kb)swing 小程序,它使用 JEditorPane 在其中显示非常简单/有限的一组小 HTML 页面,但是这似乎不能 100% 流畅地工作,一些客户得到一个显示没有任何 java 异常的空白页面. 该页面在我的机器上运行正常。我需要一种更可靠的方式向所有用户显示 HTML 页面。
如果有一个小的 + 免费类来代替 JEditorPane 的任何想法,或者是否有一个简单的修复方法可以使它更可靠(非空白)
private JEditorPane m_editorPane = new JTextPane();
m_editorPane.setEditable( false);
m_editorPane.setBackground(new Color(239 ,255, 215));
m_editorPane.setBounds(30,42,520,478 );
m_editorPane.setDoubleBuffered(true);
m_editorPane.setBorder(null);
m_editorPane.registerEditorKitForContentType("text/html", "com.xxxxx.SynchronousHTMLEditorKit");
m_editorPane.setPage(ResourceLoader.getURLforDataFile(param.trim()));