Email address field

Use an email address field when BlackBerry® device users are required to type an email address. This field permits only characters that are valid in an email address.

The first space that a user types is replaced automatically with an at sign (@) and any subsequent spaces are replaced with periods (.).

Class EmailAddressEditField
Supported since BlackBerry® Java® SDK 4.0
Example This screen shows an email address field.

For more information about email address fields, see the UI Guidelines.

Code sample: Creating an email address field

import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.component.EmailAddressEditField;

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

class EmailAddressEditFieldDemoScreen extends MainScreen
    public EmailAddressEditFieldDemoScreen()
        setTitle("Email Address Field Demo");
        EmailAddressEditField enterEmail = new EmailAddressEditField("Email address: ", "");
Next topic: Search field
Previous topic: Password field

Was this information helpful? Send us your comments.