开发者

Partial Selection in JTree using checkbox for every node

I have a application which uses a JTree. For each n开发者_Python百科ode in the tree, there is a checkbox attached to the node using a customized TreeCellRenderer. When some items of a node are selected i.e not all children of a node are selected using the chechboxes, how do i indicate using the checkbox of the parent node that only a partial list of nodes is selected. For this, i need to draw a little square in the checkbox indicating that it is partially selected.


You can use e.g. http://www.roseindia.net/javatutorials/tristatecheckbox.shtml or http://www.javaspecialists.co.za/archive/Issue082.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜