• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

Radio button

Does radio buttons have indexes or hidden values, lets say if the first radio button is selected, teh hidden value is taken.
0
zizi21
Asked:
zizi21
2 Solutions
 
CMSnetTechCommented:
Yes it is possible that hidden values can be sent back. Here is a good reference to what you might be looking for. You can do this with java scripting.

Take a look


www.codingforums.com/archive/index.php?t-7275.html 
0
 
CEHJCommented:
Have you got a web application here?
0
 
zizi21Author Commented:
actually, a jframe..
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
zizi21Author Commented:
actually, i am know how to do hidden value for jsp, . but for application, i am trying..is
0
 
maheshexpCommented:
Define your own class extending JRadioButton.

class YourRadioButton extendds JRadioButton
{
        <Your DataType> selectedValue ;

      // write the getLogic for the data you want to return.

       public <Your Data type> getValue()
     {
               .....
     }

}

Now in your code, where in your code want to get the value for your selected use getValue().
0
 
CEHJCommented:
Since Swing is based on the MVC pattern, you would be better off extending the model, not the view/controller. Extend http://java.sun.com/javase/6/docs/api/javax/swing/DefaultButtonModel.html
0
 
CEHJCommented:
:-)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now