posted 13 years ago
That's the low-level way that AWT processes events... All events aren't enabled for all components, that's why only some components can have ActionListeners added to them, and that's why you have to call enableEvents(), to enable to component to handel that class of events. All components also have a generic processEvent() method. This method calls processXXXEvent() methods based on what type of event it gets. So processActionEvent() gets sent all ActionEvents. Normally, this method would handle ActionEvents by handing them off to ActionListeners attached to them. Instead, the behavior is written right there in the method. Basically, this "hardcodes" behavior into the component that can't be overridden by a listener.