You can connect one instance of ChangeListener to all of your controls that might look (when the inner class):
private class ListenerImpl implements ChangeListener {
public void stateChanged(ChangeEvent e) { save(); }
}
, Container :
final ListenerImpl l = new ListenerImpl();
for (Component c : getComponents()) {
if (c instanceof JSpinner) {
((JSpinner)c).addChangeListener(l);
} else if (c instanceof JTextPane ) { }
}
, , addChangeListener(..) ( ).