Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Resetting a Radio Button Group

Posted on 1997-11-14
1
Medium Priority
?
178 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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 theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

877 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