In J2ME programming language canvas class is used to paint and draw the diagrams. Using the same canvas class we are going to draw a box around the text in our show text MIDlet Example. We have created a class called CanvasBoxText that extends the predefined canvas class to draw the box. In the code we have used different methods to get the values, these are..
After running the example you will get the output as given below..
In the output you can easily find out the text "SANDEEP" that is been displayed in the box. As I mentioned earlier, we need a canvas class to draw such kind of graphics in the J2ME application.
J2ME Source Code "BoxTextCanvas.java"
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.