Gauge
Article Metadata
The following code creates a Form with a Gauge.
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Gauge_ex extends MIDlet
{
Display display=Display.getDisplay(this);
public void startApp()
{
Form form = new Form("Gauge example");
//Gauge(label,interaction,maxValue,InitialValue)
Gauge gauge = new Gauge("Gauge example", false, 20, 4);
form.append(gauge);
display.setCurrent(form);
}
}
The following screen shot is an outcome.



29 Sep
2009
Gauge UI Element Picture is given in this article after code.We can put Gauge inside Form Control only. Gauge constructor takes four arguments, first is its label to display on screen above the gauge, second is type of interaction mode,third is maximum value to which gauge can be stretched by user and its initial value.
Gauge is not so often used control.Application which need to show custom items based on user specified value through gauge instead of drop down selection box. Given code compiles and runs fine.
29 Sep
2009
This article provides a basic information to beginners. Here this article explains the use of Gauge class. The Gauge class creates an animated progress bar that graphically represents the status of a process. The article creates an interactive gauge and explains with the snapshot and code example.
So this article is very much helpful to beginners.