Toggle Image Button : ToggleButton « GWT « Java






Toggle Image Button


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.ToggleButton;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;

public class GWTClient implements EntryPoint {

  public void onModuleLoad() {
    ToggleButton b = new ToggleButton("Click me", new ClickListener() {
      public void onClick(Widget sender) {
        Window.alert("Hello, AJAX");
      }
    });

    RootPanel.get().add(b);
  }
}


           
       








GWT-ToggleImageButton.zip( 7 k)

Related examples in the same category