• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

How to add Tree inside JComboBox

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Below is the requirement for which i need to add Tree inside JComboBox.
Im designing an inventory management application. While creating new product, I need to display a category and its sub category inside JComboBox. when user clicks on JComboBox, only parent categories should be displayed and when he clicks on + sign, child categories of selected category should be displayed.
The structure i m currently using is,
Add number of spaces before node name depending on the level of that node.
Like 3 spaces if its level is 3. etc.
I need to make this more user friendly adding JTree to JComboBox.

 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A simple google would have give you http://www.jroller.com/santhosh/entry/tree_inside_jcombobox
 
reply
    Bookmark Topic Watch Topic
  • New Topic