Solved

Resetting a Radio Button Group

Posted on 1997-11-14
1
170 Views
Last Modified: 2010-04-16
I have 3 radio buttons in a Symantec radio button group panel.  How can I make it so that none are selected after I press a button?  I am using java 1.0.2.

if(l_status.equalsIgnoreCase("R"))
{
    rdoRegisteredUser.setState(true);
}
else if(l_status.equalsIgnoreCase("C"))
{
    rdoContributor.setState(true);
}
else if(l_status.equalsIgnoreCase("A"))
{
    rdoAuthor.setState(true);
}

Thanks, HellBentroadhog
0
Comment
Question by:Hellbentroadhog
1 Comment
 
LVL 4

Accepted Solution

by:
russgold earned 50 total points
ID: 1230541
Strictly speaking, it is not proper to have all buttons in a radio group deselected; the idea is that you are making a choice, not initiating an action.  If none of the choices are valid, you should disable the buttons by calling setEnabled( false ) on each of them.

If you still do want to deselect them all, call setSelectedCheckbox( null ) on their associated CheckboxGroup.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This video teaches viewers about errors in exception handling.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now