Screen Navigation
Up to this point, you've been introduced to the following UI components:
MIDlet
Display
Displayable
Form
List
Alert
ChoiceGroup
TextField
Already you can build MIDP applications using them. The demo in Listing 5.3 has addressed another attribute of GUI programs: screen navigation. If you go back and look at the application in the listing more closely, you'll see that you can navigate back to the previous screen from any point. This is a feature that you see in most GUI programs.
This behavior is not automatic in MIDP, however. Only one Displayable is visible at any given time, and the implementation doesn't keep track of any history of displayed screens.
Going “forward” is simple. As the applications demonstrate, you simply create ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access