No default radio button selected (J2ME, Java)
Currently working on a mobile app in J2ME and asking questions with response options to the ChoiceGroup radio button. Any suggestion on how to make sure that no default answer is selected? We tried:
cg8.setSelectedIndex( -1, true );
But get an exception thrown error
and
cg8.setSelectedFlags( boolean[] )
with all false but also get another error.
To get around this, we also tried to create an invisible radio button and set it as selected, but also couldn't find a way to make an invisible radio button.
Any thoughts or suggestions would be greatly appreciated !!
It seems to me that the platform enforces the relevant agreement, although I must apologize for taking a purist point of view here; this will not answer your question.
Radio buttons are used when there are multiple exclusive options, of which one must ; so it makes some sense to the UI to ensure that something is always selected. Ideally, the initial choice in a radio group should always be safe and sane by default.
source to share