| 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: 16483
|
|
|
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
|
|
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: 16483
|
|
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
|
 |
 |
|
|
subject: Solved : Java Radiobutton problem
|
|
|