View RSS Feed

Java Swing

How to Write a Container Listener

Rate this Entry
by , 04-26-2012 at 08:27 PM (954 Views)
A container is involved in firing the Container events; right after the component gets added/removed. Such kinds of events are just for sake of notifications. Container listeners are not needed to be there for adding or removing the components successfully.

Container events are demonstrated by the given example. Click at ADD A BUTTON /Remove Button to add or remove buttons from the panel which is present at the window’s bottom. Everytime button is added/removed, container event is fired from a panel and container listener of the panel is sent notification. Descriptive messages are displayed by the listener in text area which is present at window’s top:

Submit "How to Write a Container Listener" to Facebook Submit "How to Write a Container Listener" to Digg Submit "How to Write a Container Listener" to del.icio.us Submit "How to Write a Container Listener" to StumbleUpon Submit "How to Write a Container Listener" to Google

Categories
Actions

Comments