Name: rmT116609 Date: 10/18/2000 java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C) Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode) Event Listeners can be a big pain to deal with once you are done with them. If you have a Component (a Choice control, JList, JButton, etc.) and you are done with it you need to remove all of the listeners that have been added to that component. This is not an impossible task, but it is made more difficult because you need to keep track of all of the listeners that you have added. It would be nice that have a few more methods at our disposal. In addition to Component's getListeners(Class c) method it would be useful to have a EventListener []listeners getAllListeners() which would return all of the listeners. Even more useful would be removeAllListeners() which would remove all of the listeners that have been added. I have a framework which launches various "applications" (java classes). The framework is also responsible for destroying the "applications". The framework should be like an Operating System and clean up after all "applications" no matter how badly they behave. The framework can not trust the "applications" to clean up after themselves correctly. (Review ID: 110989) ======================================================================
|