开发者

What is the diffrence between canvas and form in j2me? [closed]

开发者 https://www.devze.com 2023-03-10 15:36 出处:网络
It's difficult to tell what is being asked开发者_如何转开发 here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current for
It's difficult to tell what is being asked开发者_如何转开发 here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消