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 ...

Get Wireless J2ME™ Platform Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.