Search code examples
javaeditorrenderjtreejcheckbox

how to set the checkbox of a checkboxtree to be disabled?


I used this checkboxtree: it.cnr.imaa.essi.lablib.gui.checkboxtree, and this is the introduction: http://www.javaworld.com/javaworld/jw-09-2007/jw-09-checkboxtree.html?page=1.

But when I add treenode, I want to set some of the treenodes to be disabled. What api can I use?


Solution

  • In the TreeCheckingModel interface, one of the methods is setPathEnabled.

    You would setPathEnabled(treePath, false) to disable the TreePath.