title: How do I add a different JComboBox to each JTree node?
body: <p>I have a JTree that I'm filling with skills for a Game Database programme that I'm writing.</p>
  
  <p>There are several categories, and subcategories (actual skills), and then levels skill below that (sometimes). Currently I'm emulating this with one skill class, some options inside, and a few enums, plus a method to check that if the skill is a category (called isCategory). Two other things to note:</p>
  
  <ol>
  <li><strong>Different types of skill behave differently.</strong><br>Some are bought once, other several times, some have options to pick from etc</li>
  <li><strong>Different categories contain different skill.</strong><br> For instance The Weapon Skills category has different types of weapons, but the Armour Skills are in a different section.</li>
  </ol>
  
  <p>I've seen a very good example of attaching a ComboBox via a cell renderer to each node in the tree. Here is the <a href="http://www.cs.cf.ac.uk/Dave/HCI/HCI_Handout_CALLER/node156.html#SECTION000137000000000000000" rel="nofollow">example</a> I found.</p>
  
  <p>I understand the above code, but I can't see how to would attach the combo box to a node, and not to the tree? I've read '<a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html" rel="nofollow">How to use Trees</a>', and I've run, and looked at the code for a few of the <a href="http://docs.oracle.com/javase/tutorial/uiswing/examples/components/index.html" rel="nofollow">demos for tree</a>. I can make basic trees, but I find the tutorials a bit obtuse and lacking in enough detail to figure out for myself how to proceed. I've found another <a href="http://www.java2s.com/Tutorial/Java/0240__Swing/CreatinganEditorJustforLeafNodes.htm" rel="nofollow">example</a> of only rendering leaf nodes as checkboxes, which is much more complex.</p>
  
  <p>Obviously I'd like to combine the two, being able to have different categories able to have different skills and different skills have different levels of proficiency. However the only way I can think of doing so it to have different JComboBoxModels for the different types but I don't know how to do this, and I can't find out how. I've tried to edit the checkbox example to use ComboBoxes, but for the life of me I can't figure it out.</p>
  
  <p>Could someone give me a hint as to what approach to take on this, as I'm new to Java and strugglingto figure out what to do?</p>