Would you like to tell us how we are doing?

You bet No thanks

Sorry about the red box, but we really need you to update your browser. Read this excellent article if you're wondering why we are no longer supporting this browser version. Go to Browse Happy for browser suggestions and how to update.

Activity field: gauge

Use a gauge field to create a horizontal bar to display a progress indicator or a numeric value.



Supported since

BlackBerry Java SDK 4.2

More information

For more information about gauge fields, see the UI Guidelines.


A screen shot of a gauge field.

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.GaugeField;
import net.rim.device.api.ui.container.*;

public class GaugeFieldDemo extends UiApplication 
    public static void main(String[] args)
        GaugeFieldDemo theApp = new GaugeFieldDemo(); 
    public GaugeFieldDemo() 
        pushScreen(new GaugeFieldDemoScreen()); 

class GaugeFieldDemoScreen extends MainScreen
    public GaugeFieldDemoScreen ()
        setTitle("Gauge Field Demo");
        GaugeField percentGauge = 
              new GaugeField("Percent: ", 1, 100, 29, GaugeField.PERCENT);