3.6. Handling events

You now have the widgets on the screen in BasicProject, the layout is (nicely) structured via the various panels you’re using, and you’re displaying it to the user. What happens next is the user will start clicking things, typing, and generally trying to interact; a call to the server might return with data, or the browser might even be closing. Dealing with all these interactions is the process of handling events.

 

Definition

An event is an indication that something has happened. If your application is interested in a particular event, then you need to attach a relevant handler to the widget that fires the event.

 

We’ll look at the following in this short section:

  • What events are
  • How to handle events
  • How to ...

Get GWT in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.