With the help of the canvas class, we can draw as many as graphics we want in our application. Similarly we can also set the different alignment to the text. In this J2ME Midlet we are going to set the text at different locations such as right, left, top right and top left etc.. to set the alignment we have used "g.drawString();" and defined different values in it with the height and width within it.
Just find out the different methods that are used in this small j2me example..
The Application is going to look like as follows:

Source Code of CornerText.java
import javax.microedition.lcdui.*;
|
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Align Text MIDlet Example
Post your Comment