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.
[250 byte] By [bharath.gullapallia] at [2007-11-27 5:45:51]
# 1
How does it show graphically? Are all 5 nodes marked as selected?
rebola at 2007-7-12 15:27:57 > top of Java-index,Desktop,Core GUI APIs...
# 2
No Only the first child is shown as selected even graphically.
bharath.gullapallia at 2007-7-12 15:27:57 > top of Java-index,Desktop,Core GUI APIs...
# 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 > top of Java-index,Desktop,Core GUI APIs...
# 4
WOW so many thanks. i think this will solve my problem....Thanks again
bharath.gullapallia at 2007-7-12 15:27:57 > top of Java-index,Desktop,Core GUI APIs...