dcsimg
September 26, 2020
Hot Topics:

How Does Java Event Handling Work? Think Wedding Gifts

  • By Developer.com Staff
  • Send Email »
  • More Articles »

A good understanding of the Java event-handling mechanism is essential for any Java programmer. Event-based Java programming isn't limited just to GUI Swing programs; you also will find it in applications that use Java technologies such as servlets and message-driven beans.

In his JavaBoutique.com tutorial, Gurunath Kalamadi breaks down the event-handling concept with concise explanations and practical examples. He really brings the lesson home with a novel analogy for event handling: a group of friends deciding what gifts to bring to their friend's wedding.

Consider four friends: A, B, C and D. Suppose the event is A is getting married. A's friends, B, C and D, want to respond to this event. The response protocol is to attend the wedding and bring a gift for A. They all must adhere to the response protocol, but they are free to choose the gift they bring.

Read the entire tutorial at Java Boutique:
Java Programming Basics: Event Handling






This article was originally published on September 11, 2010

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.


Thanks for your registration, follow us on our social networks to keep up-to-date