I am unable to deselect a radio button.This is part of the code:
public void clearFields(){
//to clear the text from the textfield
tf1.setText("");
tf2.setText("");
tf5.setText("");
tf6.setText("");
tf7.setText("");
p1.setText("");
p2.setText("");
//to deselect the radio button
radio1.setSelected(false);
radio2.setSelected(false);
//to deselect the checkboxes
option1.setState(false);
option2.setState(false);
option3.setState(false);
}