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
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial
Discuss: Align Text MIDlet Example
Post your Comment