Create A Dialog Box; Creat A Bitmap; Create A Button; Create A List - Blackberry JAVA DEVELOPMENT ENVIRONMENT - - DEVELOPMENT GUIDE Manual

Version: 4.7.0
Hide thumbs Also See for JAVA DEVELOPMENT ENVIRONMENT - - DEVELOPMENT GUIDE:
Table of Contents

Advertisement

Development Guide
CheckboxField myCheckbox = new CheckboxField("First checkbox", true);
3.
Add the UI component to your extension of a Screen class.
mainScreen.add(myCheckbox);

Create a dialog box

1.
Import the following classes:
• net.rim.device.api.ui.Manager
• net.rim.device.api.ui.container.HorizontalFieldManager
• net.rim.device.api.ui.container.PopupScreen
2.
Create an instance of a subclass of the Manager class.
Manager manageLayout = new HorizontalFieldManager( VERTICAL_SCROLLBAR);
3.
Create an instance of a PopupScreen using the Manager object.
PopupScreen popUp = new PopupScreen(manageLayout);

Creat a bitmap

1.
Import the net.rim.device.api.ui.component.BitmapField class.
2.
Create an instance of a BitmapField.
BitmapField myBitmapField = new BitmapField();

Create a button

1.
Import the net.rim.device.api.ui.component.ButtonField class.
2.
Create an instance of a ButtonField using a style parameter.
ButtonField mySubmitButton = new ButtonField("Submit");

Create a list

Create an alphanumeric drop-down list

1.
Import the following classes:
• java.lang.String
• net.rim.device.api.ui.component.ObjectChoiceField
• net.rim.device.api.ui.container.MainScreen
2.
Create an instance of an ObjectChoiceField, providing an object array as a parameter to create a drop-down list
that contains objects.
16
UI components

Advertisement

Table of Contents
loading

This manual is also suitable for:

Java development environment

Table of Contents