i am creating an application for blackberry
i want to open a website when i focus on its name
can anybody tell me how can i do that.
thanks in advance!!!!!!!!!!
i am creating an application for blackberry
i want to open a website when i focus on its name
can anybody tell me how can i do that.
thanks in advance!!!!!!!!!!
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);