If you are talking about a JTable
you have to pass through the model to obtain the data you need. But it won't be so straightforward since the only method you have for sure is getValueAt(int row, int col)
that is not efficient to retrieve the whole list of elements of the table.
Usually you don't use just a DefaultTableModel
but a custom one that must has a way to keep track of the list of employees for sure..
In other case you will have to wrap all the column values for a row inside an object (also if you don't have any MyBean
class object) or use a composite object, otherwise it would be just crazy.