Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Solved : Java Radiobutton problem

 
Sander Silva
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21296
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21296
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved it ,
Found answer at http://wiki.netbeans.org/FaqFormRadioButtonGroup
Thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic