Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding CheckBox and Text as child of a tree  RSS feed

 
Raj Kumar Bindal
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to have the following as the child of a tree :

**CheckBox[reference of CheckBox]+some text

example:
checkbox text1
checkbox text2
checkbox text3
I am unable to add both check box and text as the child of the tree.
My nodes are generated at run time so number of checkboxes will be known only at run time.
plz tell how can i achieve this functionality.
thanx
 
Mahesh Chandrasekaran
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This can be attained only if you use a renderer for the tree nodes..to say a panel in which you add both a checkbox and a label. And this is used while rendering the Jtree during runtime...If you find difficulties I can help you with the code...

Thanks and Regards
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!