Unable to select all the children present for a parent
I use Jtree component in my class, I have 5 children under the parent. But when I try to select all the childrens under the Parent, using getSelectionPaths() , it returns me only one Child value. Rest of the 4 childrens r not getting selected.
# 3
It's well documented: http://download.java.net/jdk7/docs/api/javax/swing/tree/TreeSelectionModel.html#setSelectionMode(int)
...so this, for instance, should do the trick:
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
(玹ree?is whatever your tree's name is, of course.)
rebola at 2007-7-12 15:27:57 >
