• 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 problem

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm trying to use the JTreeTable component found on the java.sun website, with little success.
I have written my own customised TreeTableModel that uses DefaultMutableTreeNodes to store my tree structure. When I use this model in a JTree it works, in a JTreeTable, it doesn't - only the top two levels of my tree are displayed and they are not displayed in a tree structure (it just looks like a plain table).
I really don't know what I'm doing wrong, and it's driving me crazy. If anyone could help, it would be greatly appreciated.
This is the model that I am using (if you need the JTreeTable stuff then ask and I'll post it too)

thanks very much,
Tom
 
Tom Hughes
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Fixed my own problem, it was a bugger to find (took me at least a day). The solution was to override the getColumnClass method in AbstractTreeTableModel with the following,
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic