hello,
it is best practice to manage the table content using the TableModel, not the methods in JTable that can change the content as well.
In a typical object oriented project you will find DefaultTableModel inconvenient. Often a table row represents an entity that is best represented as an interface type like Customer, Assignment, Student, Record. DefaultTableModel is not intended to support such a structure in the first place.
So you can make your own TableModel implementation. In most cases it is very convenient to use AbstractTableModel.
It is all described well in the
Sun tutorial. However, when to use which way is not described in detail, thus my additional explaination.
Kai