Web Analytics
Multicasting Events in Java -->

Multicasting Events in Java

Learn how to multicast events in Java using Java AWT, Swing and Event Handling.

Multicasting Events


When a Source generates an Event, all the registered Listeners are notified and they receive a copy of the Event Object.

This is called Multicasting the EventIn the example below, there are two buttons in the main frame -- New Window and Close All WindowsClicking the 'New Window' button will add new Frames and clicking the 'Close All Windows' button will hide all the new Frames since the ActionEvent on the 'Close All Windows' button is multicast to all listeners.

Multicasting Events Example
Multicasting Events in Java


You may like these posts

  1. To insert a code use <i rel="pre">code_here</i>
  2. To insert a quote use <b rel="quote">your_qoute</b>
  3. To insert a picture use <i rel="image">url_image_here</i>