The User Interface
At this stage, we have finished the classes needed for data management. Using these classes, it is an easy task to create a platform-dependent user interface. We need to create user interfaces for MIDP and PDAP. The core of both application interfaces is the chart that is used to display the daily logs.
In the MIDP user interface, the chart class is realized using the low-level javax.microedition.lcdui.Canvas. The corresponding PDAP class is derived from java.awt.Component, the PDAP base class for components.
In both cases, the first step is to create the coordinate system and to draw borderlines for critical values.
To draw the actual data points on the chart, we can use the DayLog methods getXPoints() and getYPoints() previously ...
Get Java™ 2 Micro Edition Application Development 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.