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 ItemPlayTest Class

The ItemPlayTest class reviews some of the methods you use in association with the StringItem class. Some of these are derived from the Item class. The StringItem class works largely the same way as the other classes derived from the Item class, with the difference that the text area or field associated with it cannot be changed through direct interaction. To alter the text you associate with a StringItem object, you have a number of options, however. Among other things, you can use the notifyStateChanged() method. The StringItem class inherits the method from the Item class. Since the notifyStateChanged() method generates an event, you can use the event in conjunction with the setText() method of the StringItem class ...

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