How to write an event handling for a form to check whether any of its control values have changed? Here is my example in the simplest explanation as possible. I have a form, have a lot of controls on it. I need to prompt a dialog if any of its child controls values got changed. I can do this by having an event handler for all of its controls and use a Boolean flag so that when navigating away from that form I can check the flag and show the prompt. I think there should be a better way where we can write the event handling for the parent control (in this case the Form) and then whenever a child control value gets changed, it will trigger event handler declared with the form.
So instead of writing multiple event handling methods for each form control, how do we write just one method and capture all form controls events via that?
Thank you everybody!
Edit 1: Java Swing, Standard Java