background — callback/event-handling/listener is one of the more interesting or tricky part of swing development.
Callback site can use EventObject.getSource() to find the generator Object (for a semantic event), cast to a specific type, then access its specific methods or fields. This requires prior knowledge of the exact data type of the event-generator object. That leads to tight-coupling.
A more generic solution is the PropertyChangeListener.java. This and related classes are part of java.beans package, not limited to swing. PCL is a flexible and practical solution in a wide variety of contexts beyond swing.
PropertyChangeEvent.java holds (in addition to source) propertyKeyName, oldValue and newValue fields.
Any Listener class can implement the PropertyChangeListener.java interface and support a single callback method — propertyChange(PropertyChangeEvent). When the callback runs, at run-time it has access to all 4 constituents of the