GWT 2.0 Tutorial (The Google Web Toolkit)

Interested in training from the author of these tutorials? See the upcoming Ajax & GWT 2.0 courses in San Francisco and Maryland, or contact hall@coreservlets.com for info on customized courses at your location.


This is part of the much larger Ajax and GWT tutorial. This section concentrates on use of the Google Web Toolkit (GWT). It assumes some of the general knowledge from the Ajax basics section, but except for the JSNI section, no detailed knowledge of JavaScript is required. Click on a topic below to get the detailed tutorial, download the source code, or try out exercises on the topic.

The GWT 2.0 training courses on which this tutorial is based are usually taught on-site at customer locations, but public training courses are periodically scheduled for people with too few developers for an onsite course. For descriptions of the various other courses (Ajax, jQuery, Google Closure, JSF 2.0, servlets, JSP, Spring, Hibernate, Java 6 programming, etc.) that are available, please see the J2EE training course page. To inquire about a customized training course at your location, please contact Marty Hall at hall@coreservlets.com.

If you find these free tutorials helpful, we would appreciate it if you would link to us. Send corrections or feedback on any tutorial to hall@coreservlets.com.

GWT 2.0: Overview and Getting Started

  • This tutorial section in PDF.
  • Source code of examples in this section:
    • MyGwtApp.zip.
      First "hello world" app used in the GWT intro section. This is simply what you get when you press "New Web Application Project", with no changes whatsoever. Bundled as a zipped Eclipse project that assumes you have GWT 2.0 or later and are using the Google Eclipse Plugin.
  • Exercises to reinforce the concepts in this section.
  • Topics covered:
    • What GWT is all about
      • Motivation
      • Pros
      • Cons
    • Installing GWT
      • Core GWT
      • Eclipse plugin
      • Browser plugin
    • Making a project
      • Using Eclipse plugin
    • Testing process
      • Development mode
      • Production mode
      • Deployed to standard Java server

GWT 2.0: Programming Basics

  • This tutorial section in PDF.
  • Source code of examples in this section:
    • GwtApp1.zip.
      App used in the basic GWT section. It is built as an Eclipse project that assumes you have GWT 2.0 or later and are using the Google Eclipse Plugin.
  • Exercises to reinforce the concepts in this section.
  • Exercise solutions.
  • Topics covered:
    • Development process
      • Making a project
        • File > New > Web Application Project
      • Deleting extraneous files
        • Most Java classes other than AppName.java
      • Editing auto-generated HTML file
        • Preserve link to load JavaScript file
        • Create HTML elements with ID's for GWT to use
      • Editing auto-generated Java class
        • Add client-side event handlers
        • Create and call custom Java classes
    • Testing process
      • Development mode
      • Production mode
      • Deployed mode

GWT 2.0: Widget Event Handling

  • This tutorial section in PDF.
  • Source code of examples in this section. The following Eclipse projects assume you have GWT 2.0 or later and the Google Eclipse Plugin. See installation directions in first section.
  • Exercises to reinforce the concepts in this section.
  • Exercise solutions.
  • Topics covered:
    • Main approaches to event handling
      • Separate event handler classes
      • Main class implementing event handler interface
      • Named inner classes
      • Anonymous inner classes
    • Basic widgets and their associated events
      • Pushbuttons and related widgets
      • Checkboxes and related widgets
      • Listboxes and related widgets
      • Textfields and related widgets

GWT 2.0: Using RPC to Access Server-Side Data

GWT 2.0: Using Panels to Control Window Layout

The code and projects in this section have been updated to GWT 2.0, but this section does not yet cover the new GWT layout types (LayoutPanel, TabLayoutPanel, DockLayoutPanel, etc.). Updates to the new GWT 2.0 layout types coming last half of January 2010.

GWT 2.0: Extended GUI Widgets

GWT 2.0: JSNI -- The JavaScript Native Interface

More Information

Java

Servlets & JSP

JSF
Ajax, GWT, & JavaScript

Spring, Hibernate, & JPA

Struts