【发布时间】:2012-06-02 03:21:05
【问题描述】:
以下测试在 JRE 1.6.0_20 中失败
public void testSetGetTextWithList() throws Exception {
final JEditorPane editorPane = new JEditorPane();
editorPane.setContentType("text/html");
editorPane.setText("<ul><li></li></ul>");
assertTrue(editorPane.getText().contains("<ul"));
}
当然,空列表和不存在的列表在视觉上是有区别的,所以我希望编辑器不丢弃空列表。任何人都可以轻松解决这个问题?
【问题讨论】:
标签: java html swing html-lists jeditorpane