Screen Navigation
The HelloWorld2 example demonstrates the central abstraction of the MIDP, the Screen. You've undoubtedly noticed already that you can only display one Displayable—one Screen—at a time. When the application needed to display the Alert, it had to replace the main screen.
The reason for this single-screen abstraction is the limitation of device screen resources. Unlike desktop GUI toolkits, such as J2SE's Swing toolkit, you don't have the luxury of layered windows, pop-ups, dialog boxes, and so forth. Although not impossible to implement these abstractions, the memory and CPU requirements are prohibitive for today's mobile devices. Furthermore, the low-resolution, low-powered, small-area LCD displays characteristic of most mobile ...
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