Let's say the second RadioButton
out of three is pre-selected with setSelected(Boolean)
, the focus is still at the first RadioButton
by default. To change this use the requestFocus()
method.
radioButton2.setSelected(true);
radioButton2.requestFocus();