• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JTreeTable

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://java.sun.com/products/jfc/tsc/articles/treetable1/

I'm trying to use a JTreeTable with my own model, I have hand-jammed children and root nodes that are a subclass of DefaultMutableTreeNode.

It seems that number of children is correctly returned for getChildCount, and isLeaf return true of false correctly, but the little "plus sign" icons are not showing up to allow nodes to open/close.

Does anyone have any ideas of what method I might not be overriding to get this to work properly? I've tried the examples on the web site above, and they work. When I change to 'my data' and subclass of defaultmutabletreenode, I get this weird behaviour.

Kurt
 
Kurt Peters
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the solution. I had not defined one of the columns to override getColumnClass to return TreeTableModel.class in the column I wanted the tree to appear.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic