Suppose you have one application and you are going to develop a game why choose canvas? what can we do and what can we not do with form?Why Mobile games developed On canvas ????
Canvas is low level API.It is used for gaming,graphical process etc.It allows key events,etc Form is high level API.It contains item like TextField,ImageItem,etc.
Canvas lets an application draw screens using the low-level user-interface API, and also receive key and pointer events directly. The shortcoming of Canvas is that it gives the application no control over when a canvas repaints itself - all it can do is request a repaint - or over how quickly key and pointer events get delivered to the canvas. This lack of control can cause action games and others that are speed-sensitive to feel sluggish and unresponsive. GameCanvas was designed specifically to fix these weak points.
Form is higher level API. Form contains an arbitrary mixture of items like choice group, command, text field, text, list and etc.
For more info see this articles,
GUI components based J2ME Applications.
J2ME Canvas sample to show games programming in J2ME.
Getting Started With the MIDP 2.0 Game API.
精彩评论