NetBeans: use a radio button group

It’s possible to unite several radio buttons into the group. For example, if the buttons “On” and “Off” are in the same button group, only one of them will be active (which is logical).

To create the radio button group in NetBeans do the following:

    1. Use “Button group” from the components palette and put it into Your form. It will be added as “non-visual”

Button group component

    1. Add the radio buttons to the group, changing their ButtonGroup property (combobox in the Properties)

RadioButton properties

To remove the radio button group, go to the inspector window and remove radio button group there.

  • Remove radio button group

27 thoughts on “NetBeans: use a radio button group

  1. I had a problem with this component in netbeans,now this tip resolves it.
    thanks so much

  2. very helpful.. my prblm has been solved.. thanks a lot 🙂

  3. thank u soo much 🙂
    i have been trying to use this from a long tym

  4. Thanx alot buddy… its give me new idea to study in java..

  5. Thanks a lot.
    I saved a lot of time searching around ….

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.