Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

make certain JTree nodes uneditable

Jewel Bochs
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i am using the classes found on this webpage

i want a user to be able to modify any folder on his/her system except for system dependant folders such as WINDOWS and Documents And Settings. I think Windows will not allow this anyway, but I still would like these and maybe other nodes to not be editable.

I used

but this obviously makes everything editable.


in the JTree that display the user's file system there is a folder shown called "System Volume Information". when the node for this folder is clicked there is a noticable slowdown in performance of the software and the node does not expand. this for me is a useless node (useful for the user's system) to have in the JTree so I would like for it not to display at all.
i have tried to play around with the following code from the AbstractTreeModel class i have extended, but I am not sure this is where i should make the changes

everyone willing to share in there knowledge of these two items will be promised eternal paradise and a haraam of virgins - thanks
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic