Image and ImageItem sample program in J2ME
The program below demonstrates the use of the ImageItem MIDP UI component class. An ImageItem is a subclass of Item, so it must be placed in a Form as demonstrated by the listing.
Read tutorialTHE TUTORIAL LIBRARY
The program below demonstrates the use of the ImageItem MIDP UI component class. An ImageItem is a subclass of Item, so it must be placed in a Form as demonstrated by the listing.
Read tutorialA ticker is an object that provides scrolling text across the top of the display. A Ticker is associated with the display, not with the screen. You place a Ticker on a screen using
Read tutorialThe J2ME example shown below places four items on a Form: two gauges and a String label for each one. The labels identify the two different types of gauges defined by the Gauge cla
Read tutorialThe StringItem class defines a two-part display component. StringItem objects contain a label and some immutable text. The sample J2ME program shows the pertinent parts of the Stri
Read tutorialThis example displays the date and time because the constructor call specifies the display of both quantities. The DateField class defines three constants, which let you control wh
Read tutorialThe CLDC/MIDP supports system properties, which are key-value pairs that represent information about the platform and environment in which MIDP applications execute. Conceptually t
Read tutorialUsually the Midlets (J2ME programs) doesn't call System.exit(). MIDP applications differ from J2SE applications in the way they terminate. To terminate your MIDlet, you only need t
Read tutorialAs a programmer, you probably know that the first program you ever write when you are learning a new language is displaying the famous words, 'Hello World". This was the first prog
Read tutorialWhen you move from C++ to Java, one of the more subtle, yet important issues you will face is the difference between a C++ destructor and a Java finalize() method. Although similar
Read tutorialC++ allows one class to inherit two or more base classes at the same time. Java does not. To understand the difference, consider the two hierarchies depicted here: In both cases, s
Read tutorialOne extensively used feature of C++ that Java does not support is default function arguments. For example, the area() function shown in the following C++ program computes the area
Read tutorialOne of the most innovative aspects of Java is the interface. An interface specifies the form of its various methods without specifying any implementation details. Each class that i
Read tutorialOne example today. A better developer tomorrow.