In the given J2ME Midlet example, we are going to display the size of the screen. Like a below given image 1, the midlet will print few items on the screen and the screen size will be displayed at the command prompt (image 2).
Image 1

Image 2

To get the size of the screen, we have used getwidth and getheight method in our example.
Source Code of DisplaySize.java
import javax.microedition.midlet.*;
|
|
Recommend the tutorial |
Ask Questions? Discuss: J2ME Display Size Example
Post your Comment