public IsWidget getViewContent() {
XFlexTable panel = new XFlexTable();
panel.setCellSpacing(20);
XCheckbox check0 = new XCheckbox("Red", "Red");
XCheckbox check1 = new XCheckbox("Green", "Green");
XCheckbox check2 = new XCheckbox("Blue", "Blue");
final XCheckboxGroup groupVertical = new XCheckboxGroup(true);
groupVertical.add(check0, check1, check2);
XCheckbox checkA = new XCheckbox("Red", "Red");
XCheckbox checkB = new XCheckbox("Green", "Green");
XCheckbox checkC = new XCheckbox("Blue", "Blue");
final XCheckboxGroup groupHorizontal = new XCheckboxGroup(false);
groupHorizontal.add(checkA, checkB, checkC);
final XLabel label1 = new XLabel("Favorite color", XLabelType.Header);
final XLabel label2 = new XLabel("Favorite color", XLabelType.Header);
panel.addWidgets(label2, groupHorizontal, label1, groupVertical, new HTML(" "));
check0.setValue(true);
check1.setValue(true);
checkA.setValue(true);
checkC.setValue(true);
groupVertical.addSelectionChangedHandler(new SelectionChangedHandler() {
public void onSelectionChanged(SelectionChangedEvent e) {
String s = "Favorite color: ";
for (XCheckbox c : groupVertical.getCheckedWidgets()) {