I NEED TO KNOW HOW TO GET THE CHOSEN RADIO BUTTON.MAYBE THE COUNTERPART OF getText FOR RADIO BUTTON... I HAVE ONLY MALE AND FEMALE.
iammet 0 Newbie Poster
Recommended Answers
Jump to PostgetSelection() method for the ButtonGroup that they are both in.
Jump to PostIn what way doesn't it work? Please be specific. Does it print Male or Female?
The else on line 45 goes with the if on line 41, which seems unlikely to be what you intended.
Jump to Post@ajst
That's what getSelection() method for ButtonGroup does, for any number of buttons (apart from getting the text).
Since the thing you are most likely to do next is to perform different actions or set different data values based on which button is selected, the text doesn't really do much …
All 11 Replies
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
iammet 0 Newbie Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
iammet 0 Newbie Poster
ajst 18 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
ajst 18 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
ajst 18 Junior Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
ajst 18 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.