Fit and Polish
Support for browser history has always been tricky in web applications, especially in the Ajax world ("please use my special previous arrow, not the big one you click everywhere else!"). Thankfully, GWT provides easy integration with browser history. As users navigate through their pictures, GWTFlow pushes entries onto the browser history stack. By implementing HistoryListener in the GWTFlow.java controller, the application receives notification of history events. This lets users navigate the application like a traditional website: Pushing the back button shows the previous image or dialog screen, not the previous website.
Because the URL is changing in the browser bar, a nice side effect is that bookmark support comes for free. Users returning to the site will see the exact same state of the application where they bookmarked it. Figure 4 is the completed application.

Conclusion
JavaScript is the new Assembly language. Google Web Toolkit lets you create Ajax programs in Java and compile them into browser-specific JavaScript, hiding most of the browser quirks that unnecessarily complicate Ajax development. Using GWT, you can create highly interactive applications that run on all major browsers with no plug-ins. Most importantly, you can do it with a portable, object-oriented language and mature tools that you already know.
References
A live demo of GWTFlow and source code is available at www.adamhoughton.com/GWTFlow. Here are a few resources to help you learn more about GWT:
- The GWT homepage is at code.google.com/webtoolkit.
- The GWT team blog is available at googlewebtoolkit.blogspot.com.
- The GWT Forum is at groups.google.com/group/Google-Web-Toolkit.
- The GWT Widget Library is at gwt-widget .sourceforge.net.
- Ed's book Google Web Toolkit: Taking the Pain Out of Ajax is available at pragmaticprogrammer.com/titles/ebgwt.
- Robert Hanson and Adam Tacy's book GWT in Action book is available at www.manning.com/hanson.
- GWT Designer is at www.instantiations.com/gwtdesigner.