Create A Progress Bar Field; Create A Text Label; Create A List From Which Users Can Select Multiple Items - 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
• net.rim.device.api.ui.component.BasicEditField
2.
Create an instance of an AutoTextEditField.
AutoTextEditField autoT = new AutoTextEditField("AutoTextEditField: ",
"");

Create a progress bar field

1.
Import the net.rim.device.api.ui.component.GaugeField class.
2.
Create an instance of a GaugeField.
GaugeField percentGauge = new GaugeField("Percent: ", 1, 100, 29,
GaugeField.PERCENT);

Create a text label

1.
Import the net.rim.device.api.ui.component.LabelField class.
2.
Create an instance of a LabelField to add a text label to a screen.
LabelField title = new LabelField("UI Component Sample",
LabelField.ELLIPSIS);

Create a list from which users can select multiple items

1.
Import the following classes:
• java.lang.String
• net.rim.device.api.ui.component.ListField
• net.rim.device.api.ui.container.MainScreen
2.
Import the net.rim.device.api.ui.component.ListFieldCallback interface.
3.
Create a class that implements the ListFieldCallback interface.
private class ListCallback implements
ListFieldCallback {
4.
Create the items that you want to display in a ListField.
String fieldOne = new String("Mark Guo");
String fieldTwo = new String("Amy Krul");
5.
Create an instance of a ListField.
ListField myList = new ListField(0,ListField.MULTI_SELECT);
UI components
21

Advertisement

Table of Contents
loading

This manual is also suitable for:

Java development environment

Table of Contents