Creating

Top  Previous  Next

 

TreeTable uses a TreeTableModel as its table model, which can be specified at construction time using the constructor:

 

public TreeTable(TreeTableModel model);

 

You can also create a TreeTable by specifying the underlying data with a ListTableModel:

 

public TreeTable(ListTableModel model);

 

In this case, a TreeTableModel will be created automatically with the method:

 

protected static TreeTableModel createDefaultTreeTableModel(ListTableModel tableModel);

 

The TreeTableModel created will provide a wrapping around the supplied ListTableModel, and will also become the TreeTable's data model.