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.

Picture: bitmap

Use a bitmap field to display bitmap images that a BlackBerry device user can view.

Class

BitmapField

Supported since

BlackBerry Java SDK 3.7

More information

For more information about bitmap fields, see the Multimedia Development Guide.

Example

This screen shows a picture bitmap field.

import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.BitmapField;
import net.rim.device.api.ui.container.MainScreen;

public class BitmapFieldDemo extends UiApplication 
{
    public static void main(String[] args)
    {
        BitmapFieldDemo theApp = new BitmapFieldDemo(); 
        theApp.enterEventDispatcher(); 
    }
    
    public BitmapFieldDemo() 
    { 
        pushScreen(new BitmapFieldDemoScreen()); 
    } 
}

class BitmapFieldDemoScreen extends MainScreen
{

    public BitmapFieldDemoScreen ()
    {
        setTitle("Bitmap Field Demo");
        Bitmap bitmapImage = Bitmap.getBitmapResource("BlackBerry_Data_Stream.jpg");
        BitmapField fieldDemo = new BitmapField(bitmapImage);             
        add(fieldDemo);
    }
}