This is a simple example of drawing lines using canvas class in J2ME. In this example we are creating three different lines at different locations and form. In the source code CanvasLine class extends the Canvas class to draw these lines. To draw these lines by two types, one is Graphics.DOTTED and another is Graphics.SOLID. To draw this canvas we are uses the following methods:
The Application is as follows:

Source Code of LineCanvas.java
import javax.microedition.midlet.*;
|
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: Simple Line Canvas Example
Post your Comment