This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
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

JTree with checkbox as node  RSS feed

 
sonia arora
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need to implement a JTree with checkboxes as nodes.
and attach a event handler with each node so that on selection of a checkbox desired action is performed.
help needed urgently.
thanks.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> help needed urgently.

well, it's not that hard, and there's plenty of sample code out in the world of google.
 
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
sonia arora wrote:
help needed urgently.
thanks.


EaseUp

What have you got so far, and where are you stuck?
Did you fully read the last post which you tried to hijack and Devaka locked it?
 
sonia arora
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
see i have seen whats available on google.
but i just cannot implement what i am not able to understand.
so need to know what is the purpose of using treecelleditor, treecellrender, etc.
if you can help?
 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sonia arora wrote:so need to know what is the purpose of using treecelleditor, treecellrender, etc.

TreeCellRenderer will be used to display your nodes for viewing. They need to show the check box as well as the original content.
TreeCellEditor will be used to edit your nodes. They need to show an editable check box and the original content.

And you can't tell me you found nothing useful here.
 
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
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#editrender
Though it talks about a table, conceptually it is the same for a tree.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!