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

Using RecordListener Objects

The RecordListener interface provides three methods that allow you to create listeners for RecordStore actions involving adding, changing, and deleting records. A listener is a method that is automatically paired with another method. It reports on the actions of the method with which it is paired. As Figure 8.14 illustrates, the RecordListener interface provides three methods. They work in conjunction with the addRecord(), deleteRecord(), and setRecord() methods of the RecordStore classes. Each time one of these methods is invoked, the recordAdded(), recordChanged(), or recordDeleted() method is also invoked. By taking advantage of this relationship, you can perform background messaging or cleanup activities.

Figure ...

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