Hi, a) If multiple listeners are added to a component, the order of invokation is specified to be the order in which they were added. this is false, isn't it? one mock exam i did, it said true, but other exam said it was false. Can someone help me out? Thanks in advance..
Sean, You are right. As per the event delegation model which is used in Java 2 ,all listeners of a particular event are notified but the order in which they are notified may/may not be the same as the order in which they were added.
I will say that it is exact that you cannot garantee the order in wich listener will be called but If you subclass a component (like Button) and in the constructor of the class that you are building you call the enableEvents method + you override the processActionEvent method of the component. The processActionEvent method that you provided will be called before any listener of this component. Hope this help.
[This message has been edited by Claude Rouleau (edited October 25, 2000).]