Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTree - DISCONTIGUOUS_TREE_SELECTION  RSS feed

 
sahitya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am using JTree with selection mode as DISCONTIGUOUS_TREE_SELECTION.

I have to rename all the selected nodes with the corresponding text.

Could anyone let me know, how to retrieve all the selected nodes in JTree if the selection mode is DISCONTIGUOUS_TREE_SELECTION.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sahitya sahitya:
Hi

I am using JTree with selection mode as DISCONTIGUOUS_TREE_SELECTION.

I have to rename all the selected nodes with the corresponding text.

Could anyone let me know, how to retrieve all the selected nodes in JTree if the selection mode is DISCONTIGUOUS_TREE_SELECTION.


JTree#getSelectionModel().getSelectionPaths().

"Sahitya Sahitya" If I remember correctly, last time, you were requested to change your display name to confirm with the ranch's naming policies. I am surprised you still havent done so. Please do so immediately.
 
Rob Spoor
Sheriff
Posts: 20904
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Maneesh Godbole:
JTree#getSelectionModel().getSelectionPaths().

Which is also called by JTree#getSelectionPaths which is a bit shorter

"Sahitya Sahitya" If I remember correctly, last time, you were requested to change your display name to confirm with the ranch's naming policies. I am surprised you still havent done so. Please do so immediately.

You can find the policy here. Failure to follow it may lead to your account being closed.
[ September 25, 2008: Message edited by: Rob Prime ]
 
sahitya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You.....The problem is solved.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by sahitya:
Thank You.....The problem is solved.


Not really.
As per the naming policy:
...with a first and last name, and maybe more, separated by spaces
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!