As you already aware of the canvas class and it's use in J2ME application, we are using canvas class to draw the triangle on the screen. In this example you will learn how to draw a triangle and filling it with particular color.
Output of the draw triangle application will look like as follow...

Source code to draw a triangle in J2ME
file name DrawTraingle.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: J2ME Draw Triangle
Post your Comment