package com.java2s.gwt.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.MultiWordSuggestOracle;
import com.google.gwt.user.client.ui.SuggestBox;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Label;
public class GWTClient implements EntryPoint {
public void onModuleLoad() {
MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
SuggestBox suggestBox = new SuggestBox(oracle);
oracle.add("ABCD");
oracle.add("ABC");
oracle.add("ABCE");
VerticalPanel suggestPanel = new VerticalPanel();
suggestPanel.add(new Label("Suggest box:"));
suggestPanel.add(suggestBox);
RootPanel.get().add(suggestPanel);
}
}
|