I would like to notify ListModel that a certain ArrayList have been modified.
My ArrayList is automatically updated after I create every person by:
new Person(...);
It is achieved as I add every person to ArrayList at the end of Person constructor.
I would like to ListModel listen to any changes in that ArrayList. The ArrayList is part of a HashMap<Class, ArrayList> where all instances of every class are stored.
How to notify ListModel that the ArrayList have been changed?
Notice: I don't mean: how to make ListModel notify the Jlist.
Use an ObservableList instead of
ArrayListand register aObservableListListeneron yourListModelor for simplicty sake, use a Property Change Listener