I am making a JTable that uses an arrayList for data population. I have two sets of data in the arrayList. one for one type of table and another for another type of table.
What I am hoping to do is overload the getValueAt method on the abstractTableModel so that it takes in an argument to which set of data I want.
Is this possible or should I think about this a different way?
Nobody stops you from overloading the method. It's just that the JTable
code won't call your new method. You will have to overwrite the regular public Object getValueAt(int rowIndex, int columnIndex)
and call the other method from inside it, based on your business logic.