ПОМОГИТЕ плиз!!! я Новичок нуждаюсь в помощи!
/*
* To change this template, choose Tools | Templates * and open the template in the editor. */ package org.yournamehere.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.ui.TextBox; /** * Main entry point. * * @author L C */ public class MainEntryPoint implements EntryPoint { /** * Creates a new instance of MainEntryPoint */ public MainEntryPoint() { } /** * The entry point method, called automatically by loading a module * that declares an implementing class as an entry-point */ public void onModuleLoad() { final Label label = new Label("Надпись "); final Button button = new Button("Cменить надпись!"); final TextBox TB = new TextBox (); TB.setName("TB"); final Button knopka = new Button("Вернуть обратно!"); button.addClickHandler(new ClickHandler(){ public void onClick(ClickEvent event) { label.setText("След.Надпись"); label.setText("Надпись"); } }); RootPanel.get().add(label); RootPanel.get().add(button); RootPanel.get().add(TB); RootPanel.get().add(knopka); } } помогите сделать чтоб введенный текст в TextBox при нажатии на button заменил Label, и при нажатии на 2 Button возвращал самый первый текст label! |
Может вас забанить для понятности?
|
Часовой пояс GMT +3, время: 23:58. |