Roughian Examples Site Map - GWT Examples - Tutorials

RadioButton


Version 1.0 onwards

The RadioButton is lika a button on a radio - you can select one at a time



Listeners



Notes


You must know the RadioButton or you wouldn't have got this far in I.T. It all works the way you expect with the exception that you'll definitely want a RadioBar - a set of RadioButtons where you can get the selected index, the selected text and the selected value. There isn't one in GWT. Perhaps I'll write one.


Code


VerticalPanel panel = new VerticalPanel();
panel.addStyleName("demo-panel-padded");
panel.add(new RadioButton("group", "One"));
panel.add(new RadioButton("group", "Two"));
panel.add(new RadioButton("group", "Three"));