我正在创建一个XMl编辑器。我希望JeditorPane具有根据节点的展开折叠功能。如果有人知道该怎么做,请告诉我…
发布于 2010-10-31 15:25:14
这是一个折叠代码的例子。http://java-sl.com/collapse_area.html和另一个XMLEditorKit示例(包含展开/折叠节点) http://java-sl.com/xml_editor_kit.html
致敬,Stas
发布于 2010-10-16 05:05:33
您可以查看org.netbeans.swing.outline,如本answer中所述。因为Outline扩展了JTable,所以定制rendering相对容易。我把Outline放在JSplitPane的左边,把JEditorPane放在右边;使用ListSelectionListener来相应地更新JEditorPane。
https://stackoverflow.com/questions/3930966
复制相似问题