Old versionsSee all
ContainerEventDemo is a Java event listener designed as a Container Listener.
Container events are fired by a Container just after a component is added to or removed from the container. These events are for notification only — no container listener need be present for components to be successfully added or removed.
By clicking Add a button or Remove a button, you can add buttons to or remove them from a panel at the bottom of the window. Each time a button is added to or removed from the panel, the panel fires a container event, and the panel's container listener is notified. The listener displays descriptive messages in the text area at the top of the window.