I was wondering whether there is any other way to handle and event coming from any of N controls, which would read the ActionCommand
value and act based on that. So far I basically have a defitinion of ActionListener
which I add to each of the controls individually. For instance, if I have 50 checkboxes, I would like to write a method like
void process(){
getCommandValueAndDoSth();
}
but rather than instantiate ActionListener for all the checkboxes, I would like just to control all the checkboxes.