• Post Reply Bookmark Topic Watch Topic
  • New Topic

Please Help !!!!! Can I add JCheckBox & JComboBox to JTree

 
Pooja Prasad
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have implemented a custom Tree Cell Renderer for having checkboxs on each nodes of the Jtree. I also want to put combo box with 5 values in it, from which the user can select one.
Please let me know if it is possible.
And if yes, how should i go about doing it.
Regards
Pooja
 
Matt Senecal
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Did you mean that you want each node to have a JCheckBox *and* a JComboBox? If so, you can change your editor/renderer to handle JPanels, and then just add both Swing objects to the JPanel in each node. I've done it in past projects.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!