I want my BlackBerry app to open a website when I focus on its name.
Can anybody tell me how to do that?
I want my BlackBerry app to open a website when I focus on its name.
Can anybody tell me how to do that?
final LabelField label = new LabelField(url,LabelField.FOCUSABLE);
label.setFocusListener(new FocusChangeListener(){
public void focusChanged(Field field, int eventType) {
if(eventType == FOCUS_GAINED){
BrowserSession bSession = Browser.getDefaultSession();
bSession.displayPage(label.getText());
}
}
});
add(label);