Address Book

This example application implements a simple address book. A subclass of ListView called AddressView is created which uses a subclass of ListItem called AddressItem. Each AddressItem draws a set of text strings containing names, addresses, phone numbers, etc. If the user double-clicks on a field, a TextField is temporarily superimposed over the field in order to allow editing of the field. The tab key can be used to move from field to field within an entry.

A separate TextField is used to do an incremental seach of the fields. Each key event received by the TextField is filtered by the AddressView, and used to advance the search.

A ScrollGroup displaying a TextView is used to display and edit a general info field associated with each address entry.

Finally, a set of Buttons (with a custom drawing method) is used to add and delete entries, to allow loading from a file, and to allow saving to a file when run stand-alone or from the appletviewer.

This example primarily illustrates the use of the following classes and concepts:

Secondarily, it also illustrates:

The sources: