Add checkBox in Form

hi , i’m new to vaadin , and i,m using this
FormExample
to create my forms but i don’t know how to add checkbox to this form …
please help me

Add an instance-variable to your underlying bean and then update your MyFieldFactory with some lines similar to the ones already there, returning a CheckBox when your new field is encountered.

if(property.getId().equals("nameOfYourBeanField")) {
    return new CheckBox();
}

That code hasn’t been checked for correctness, maybe a method-name is wrong, but it should be enough to give you the overall idea …

Thank you for your reply , it gives me some idea so i can add check box and also optiongroup to the form .