wood burning stoves 2.0*
The moose likes Java in General and the fly likes Solved : Java Radiobutton problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Solved : Java Radiobutton problem" Watch "Solved : Java Radiobutton problem" New topic
Author

Solved : Java Radiobutton problem

Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
Solved it , Don't read this post
Found answer at http://wiki.netbeans.org/FaqFormRadioButtonGroup
Thank you

I'm using netbeans 7 to create a UI to connect MS Access database.
Currently I have problem with a Radio button I use to add Gender (M,F)
In my GUI both Male and Female can be selected at once. But
I need to avoid multi selections, So that only 1 Radio button can be use at
a time. Below I have posted appropriate parts of my code.

May this could be done changing button properties ?


Thank you very much for reading.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Here's the relevant Oracle tutorial: How to Use Buttons, Check Boxes, and Radio Buttons. Scroll down to the part about radio buttons to see how to make them be mutually exclusive.
Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
Paul Clapham wrote:Here's the relevant Oracle tutorial: How to Use Buttons, Check Boxes, and Radio Buttons. Scroll down to the part about radio buttons to see how to make them be mutually exclusive.


Reply : Thank you!

I fount that ,

I need to create a ButtonGroup instance and add each radio button to it.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Sander Silva wrote:I need to create a ButtonGroup instance and add each radio button to it.


Glad you got it solved! (I was afraid you were going to ask "How do I do that in Netbeans"...)
Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
Solved it ,
Found answer at http://wiki.netbeans.org/FaqFormRadioButtonGroup
Thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Solved : Java Radiobutton problem
 
Similar Threads
convertNumber question
validation in radio buttons
problem when Columnrenamed
Javascript with Radio Button
Displaying an outputLabel below a radio button