public TreeTableModelAdapter(TreeTableModel treeTableModel, JTree tree) {
this.tree = tree;
this.treeTableModel = treeTableModel;
tree.addTreeExpansionListener(
new TreeExpansionListener() {
// Don't use fireTableRowsInserted() here;
// the selection model would get updated twice.
public void treeExpanded(TreeExpansionEvent event)
{ fireTableDataChanged(); }