O'Reilly logo

Google Web Toolkit Solutions: More Cool Useful Stuff by Rob Gordon, David Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Solution 4. Viewports and Maps

When you start working with GWT, it doesn’t take long before you realize that the possibilities are endless. Pretty much anything you can implement in a desktop application with frameworks like Swing or the SWT is also possible with GWT.

Swing provides a handy component known as a viewport, which serves as a port onto a larger view; thus the name. Viewports are handy for all sorts of things. For example, if you wanted to create a game with a scrolling background, you might use a viewport to show a portion of your background. As the game’s characters approach the edges of the viewport, you could scroll the underlying background to let those characters explore other portions of your game’s landscape.

Another use for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required