java same ArrayList for multiple table model
I am struggling to avoid data duplication with multiple JTable. Basically I have a TableModel which has an arraylist of data and a string[] header. So far nothing new. Now I have another TableModel which has the same arraylist of data BUT a different string[] header. I can't make my code to work. I would appreciate some idea on how to share the arrayList of data across multiple table model. So when I change the data all models are updated and there isn't data duplication. I would like to avoid copy of arraylist any idea or am I wrong with this setup? I did try listener but I think going that