• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dynamic checkbox JTree

 
Raavi Saankar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to create Dynamic JTree with checkbox.
 
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
Raavi,
Welcome to the Ranch.

Are you aware how to create a tree? Do you know what a renderer is?
If not, I would suggest you start here

Please note, we do not provide ready made code here at the Ranch. On the other hand, we are more than willing and eager, to help you find solutions.
Please take a look at this link which will tell you how to get the most of the Ranch.
 
Raavi Saankar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i can able to add checkboxes for static folders but i can't add dynamicaly that is my problem. How to get files and folder dynamicaly and add checkbox.
 
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
Raavi Saankar wrote:i can able to add checkboxes for static folders but i can't add dynamicaly that is my problem. How to get files and folder dynamicaly and add checkbox.


What do you mean by static folder?
All you need to do is traverse the folder hierarchy and construct the nodes accordingly.
A folder will be a node, a file will be a leaf. Folders with no children (empty folders will be leaves)
Do you know how to traverse a folder hierarchy?

Please do not ask for ready made code. I had explained in my earlier post, that is not the way things happen here at the Ranch.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!