Study Notes on j2-based learning platform (7)

Source: Internet
Author: User
The development of mobile phone programs will certainly involve graphics processing issues. Like transaction processing, MIDP processes the graphic interface
It is also divided into advanced graphic interface processing and low-level graphic interface processing. Similarly, the advanced graphic interface can be used to conveniently move values,
Limited functions and powerful low-level graphic interface, but some code may need to be changed after the value is moved. All advanced graphic interfaces must be inherited.
While the low-level graphic interface inherits the Canvas and uses the graphic processing methods defined by Graphics in large quantities. Figure used by MIDP
The interface classes all belong to the javax. microedition. lcdui package used in the previous code. At the same time (only the same
Time) only one subclass of Canvas and Scree can exist.
The Screen class has four subclasses: Alert, List, TextBox, and Form. Form is an element that does not have any interfaces,
It is just a container that can accommodate other Item classes in which it is used to combine a complex graphic user interface. The other sub-classes belong
It encapsulates a predefined fixed graphic interface and can only be used separately. This is actually the relationship between various input boxes and forms in HTML.
Like other development languages, you can test the usage of these sub-classes one by one. Pai_^ use the actual program
Description of the relationship and the difference between the two.
I. List
1) Choice. IMPLICIT
Package com. graph;
* @ Author You Li
* CopyRight (C) 2005
Import javax. microedition. lcdui .*;
Import javax. microedition. midlet .*;
Public class IMPListTest extends MIDlet implements CommandListener {
Private Display display;
Public IMPListTest (){

// TODO automatically generates the constructor stub
Display = Display. getDisplay (this );
Protected void startApp () throws MIDletStateChangeException {
// TODO automatically generates method stubs
List aList = new List ("ListTest", Choice. IMPLICIT );
AList. append ("A", null );
AList. append ("B", null );
AList. append ("C", null );
AList. append ("D", null );
AList. setCommandListener (this );
Display. setCurrent (aList );
Protected void pauseApp (){
// TODO automatically generates method stubs
Protected void destroyApp (boolean arg0) throws MIDletStateChangeException {
// TODO automatically generates method stubs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.