For more information see Chapter 9 of MIDP specification.
The application can switch the screens by calling {@link javax.microedition.lcdui.Display#setCurrent(Displayable)}.
It is recommended that the screens are simple and contain as few UI components as reasonable.
The high-level API is designed for business applications whose client parts run on MIDs. For these applications, portability across devices is important. In order to achieve this portability, the high-level API employs a high level of abstraction and provides very little control over look and feel. This abstraction is further manifested in the following three ways:
In other words, when using the high-level API, it is assumed that the underlying implementation will do the necessary adaptation to device's hardware and native UI style.The actual drawing to the MID's display is performed by the implementation. Applications do not define the visual appearance (e.g. shape, color, font, etc.) of the components. Navigation, scrolling, and other primitive interaction is encapsulated by the implementation, and the application is not aware of these interactions. Applications can not access concrete input devices like specific individual keys.
The screens implementing the high-level API are the subclasses of {@link javax.microedition.lcdui.Screen}.
The low-level API, on the other hand, provides quite little abstraction. This API is designed for applications that need precise placement and control of graphic elements and access to low-level input events. Some applications also need to access special, device-specific features. A typical example of such an application would be a game. Using the low-level API, an application can:
Classes {@link javax.microedition.lcdui.Canvas} and {@link javax.microedition.lcdui.Graphics} implement the low-level API.Have full control of what is drawn on the display. Listen for primitive events like key presses and releases. Access concrete keys and other input devices
Applications that program to the low-level API are not guaranteed
to be portable, since the low-level API provides means to access details
that are specific to a particular device. If the application does
not use these features, the applications will portable and it is recommended
that the applications stick to the platform-independent part of the low-level
API when ever possible. This means that the applications should not directly
assume any other keys than defined in class Canvas, and should not blindly
trust on any specific screen size. Rather, the application game-event mechanism
should be used instead of referring to concrete keys, and application should
ask and adjust to the size of the display.