Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Restrictive Multiple Selections in JTree  RSS feed

 
Ravi Sathish
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I'm kind of simulating Explorer behavior using JTree; I allow Multiple Selections(discontigous) in my tree.

So far so good...

But i want my slections to be restrictive:

for e.g if my tree is:

Parent
|
|__ child1
|
|__ child2

Then multiple selections should be: child1, child2

or selection : parent

a multiple selection like: Parent, child1 is useless for me

Infact I have made some progress: I dont let users select child1 and then Parent.

But I cant prevent a user first selecting Parent and then child1 ?

Any ideas in this front.. Have guys faced similar situations... any workarounds apart from restricting selections to Single Selection?

Thanks
Ravi
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!