Class Button
A standard push-button widget.

CSS Style Rules
Example
public class ButtonExample implements EntryPoint {
public void onModuleLoad() {
// Make a new button that does something when you click it.
Button b = new Button("Jump!", new ClickListener() {
public void onClick(Widget sender) {
Window.alert("How high?");
}
});
// Add it to the root panel.
RootPanel.get().add(b);
}
}
Constructors
Methods
click() | Programmatic equivalent of the user clicking the button. |
Constructor Detail
Button
public Button()
Creates a button with no caption.
Button
Creates a button with the given HTML caption.
Parameters
- html
- the HTML caption
Button
Creates a button with the given HTML caption and click listener.
Parameters
- html
- the HTML caption
- listener
- the click listener
Method Detail
click
public void click()
Programmatic equivalent of the user clicking the button.