Srinivasan,
the question is where do you want to display the text? in the button itself, a label or any other container?
you should use the
control.setText('your text') in order to set the text you need to display... however, the control will depend on what control you have - again, your button, a label, etc.. make sure you reference the control by its id