O'Reilly logo

Java™ ME Game Programming, Second Edition by Ph.D. Martin J. Wells, Ph.D. John P. Flynt

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

The SonnetMaker Class

You can find the SonnetMaker class included in the NetBeans Chapter12MIDlets project and as a standalone file in the Chapter 12 source folder. The SonnetMaker class illustrates the use of a noninteractive Gauge object. The noninteractive Gauge object displays status bars to audit the timed process of retrieving lines of a sonnet from an array at intervals of a second each. The timing activity is made possible by the Timer and TimerTask objects, and the lines of the sonnet are provided by a Vector object. To accommodate the TimerTask and Vector activities, two inner classes, CompositionTask and Sonnets, are defined. As its name implies, the CompositionTask class specializes the TimerTask class and provides an object that ...

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