The example illustrates how to draw the different types of rectangle in J2ME. We have created CanvasRectangle class in this example that extends to the Canvas class to draw the given types of rectangle. In this figure first two rectangle draw from the solid and dotted line and the other two rectangle draw as round Rectangle shape. To draw these types of rectangle we are useing following methods:
The Application is as follows:
Source Code of RectangleCanvas.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.