final TextBox text new TextBox text setText final Button button new Bu

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
final TextBox text = new TextBox();
text.setText("" + i);
final Button button = new Button("Click Me");
button.addClickListener(new ClickListener()
{
public void onClick(Widget widget)
{
text.setText(text.getText() + "Click!");
}
});