如何在JTextPane中实现项目符号? [英] How to implement bullet points in a JTextPane?
本文介绍了如何在JTextPane中实现项目符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 JTextPane
,带有 StyledDocument
和 RTFEditorKit
实施。
I have a JTextPane
with a StyledDocument
and RTFEditorKit
implemented.
如何在 JTextPane
上添加项目符号(最好是多级项目符号?)
How can I add bullet points (preferrably multi-level ones) onto the JTextPane
?
推荐答案
想出这样做:
HTMLEditorKit.InsertHTMLTextAction bulletAction = new HTMLEditorKit.InsertHTMLTextAction("Bullet", "<li> </li>", HTML.Tag.BODY, HTML.Tag.UL);
这篇关于如何在JTextPane中实现项目符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文