06-21-2012 05:56 AM
Hi
i am new in blackberry , i want to know how to update value of any integer (example).Please give me sample
code running code so i can applied gud logic.Example
I want to update value of x:
Please Help
Solved! Go to Solution.
06-21-2012 05:58 AM
06-21-2012 06:00 AM
06-21-2012 06:06 AM
06-21-2012 06:14 AM
Hi Naveen,
I dont know about your requirement, but see this snippet to update the value.
public class MyScreen extends MainScreen
{
private int i = 0;
private LabelField lblNum;
public MyScreen()
{
lblNum = new LabelField(""+i);
ButtonField _btn = new ButtonField("Click Here",ButtonField.CONSUME_CLICK);
_btn.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context) {
i = i+1;
lblNum.setText(""+i);
invalidate();
}
});
add(lblNum);
add(_btn);
}
}
Thanks.
06-21-2012 06:19 AM
06-21-2012 06:23 AM
How you are getting value from server,
Have you established any connection?
06-21-2012 06:29 AM
06-21-2012 07:33 AM
Please only ask a question once. There is no value in having duplicate entries and it bloats the forum,
Shall I ask the administrators to remove this duplicate Thread?
http://supportforums.blackberry.com/t5/Java-Develo
06-21-2012 07:34 AM