Skip to main content

How to display tree in JNTreeTable?

1 reply [Last post]


I'm currently trying to get JNTreeTable to work into my application. I basically use my old working TreeModel which I extended to be a TreeTableModel, but I wonder how to get the tree displayed in a column.

The 0.5 documentation gives me little to work with. Maybe someone else figured out how to get this done?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-10-16


you have to return org.jdesktop.swing.treetable.TreeTableModel.class for column 0 in getColumnClass(..).

* @see org.jdesktop.swing.treetable.TreeTableModel#getColumnClass(int)
public Class getColumnClass(int arg0) {
return (arg0 != 0 ? Object.class : org.jdesktop.swing.treetable.TreeTableModel.class);