Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个自定义复选框节点树。结构是这样的。
您会注意到子树是从复选框节点树中绘制的。
而我需要的是,
子树必须在文件夹图标而不是复选框下绘制。
请在这方面指导我。
添加One为叶子(如Two和Three)。否则,这棵树没有意义。
One
Two
Three
您正在使用自定义TreeCellRenderer?只需缩进它,即在左侧添加具有文件夹图标宽度的填充。如果您不使用自定义TreeCellRenderer:那就是要走的路。
TreeCellRenderer