java - JradioButtons unchecking -


i have menu bar 2 menus on it.

on 1 of menus have difficulities easy,medium,hard.

when clicking on several of these radiobuttons stay checked. problem is: how uncheck them , make sure 1 of buttons can remain checked @ time?

i have tried doesnt seem work.

 if (easy.isselected() == (true))   {     medium.setselected(false);     hard.setselected(false);          }   if (medium.isselected() == (true))   {     easy.setselected(false);     hard.setselected(false);      }   if (hard.isselected() == (true))   {     easy.setselected(false);     medium.setselected(false);  } 

read section swing tutorial on how use button group. contains link on how use radio buttons code example.


Comments

Popular posts from this blog

iphone - Three second countdown in cocos2d -

hyperlink - how to do url routing in php -

c++ - CryptStringToBinary API behavior -