• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Restrictive Multiple Selections in JTree

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:

|__ 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?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic