• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

state of radio button.

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Checkbox cb1 and cb3 have their state set to true.
At //1 : Checkbox cb3 is set to belong to CheckboxGroup cbg.
When,this is compiled and run,they appear as radio buttons,but both cb1 and cb3 are selected.
Are they not radiobuttons in the true sense?
Is it necessary to set the Checkbox to a CheckboxGroup in it's constructor itself ,to ensure mutually exclusive nature?
Pl.clarify.
Thanks.
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
geetha, I changed your code a little bit:

now it only shows "lotus" as selected, but if you select any of the other 2, "lotus" is still selected, this was the best I could do. I�ll let you know if I discover a better solution or why does this happen.
Francisco
 
geetha nagarajan
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Francisco.
So,i guess for all practical purposes to ensure mutually exclusive nature for radiobutton,the Checkbox should be set with the reqd. CheckboxGroup in the constructor itself.
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, we can set the group using setCheckboxGroup().The above code should have the last one as selected checkbox.
 
reply
    Bookmark Topic Watch Topic
  • New Topic