
public class RadioButtonExample implements EntryPoint {
public void onModuleLoad() {
// Make some radio buttons, all in one group.
RadioButton rb0 = new RadioButton("myRadioGroup", "foo");
RadioButton rb1 = new RadioButton("myRadioGroup", "bar");
RadioButton rb2 = new RadioButton("myRadioGroup", "baz");
// Check 'baz' by default.
rb2.setChecked(true);
// Add them to the root panel.
FlowPanel panel = new FlowPanel();
panel.add(rb0);
panel.add(rb1);
panel.add(rb2);
RootPanel.get().add(panel);
}
}
| RadioButton(String) | Creates a new radio associated with a particular group. |
| RadioButton(String, String) | Creates a new radio associated with a particular group, and initialized with the given HTML label. |
| RadioButton(String, String, boolean) | Creates a new radio button associated with a particular group, and initialized with the given label (optionally treated as HTML). |
true to treat the specified label as HTML