This code is taken from the tutorial written by Jörn Hameister, available here.
From Jörn sample, the main modifications are:
Add of an even Listener, to report data modifications to the table.
Since Java Swing GUI components also still needed a model that actually is not equal to the data model, is now a
class MyTreeTableModelAdapter which of AbstractTableModel inherits created. This class will be later in the class
MyTreeTable as a model for the JTable uses. If the TreeTable later for values asks to be displayed, it must be
determined whether the requested values of the tree or directly from the data model
MyAbstractTreeTableModel can be delivered. In addition, in the class, nor is
TreeExpansionListener created and registered. This responds to clicks in the tree and makes dafüf that the tree is up