Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

adding Checkboxgroup to a panel

 
shree vijay
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is this statement valid?
topPanel.add(cbg);
topPanel is of type Panel and cbg is of type CheckboxGroup.
Rgds,
Shree
 
shree vijay
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Regarding the above question, i checked the api doc and found there is no add method for CheckboxGroup. Then , how do you add a CheckboxGroup object to a panel?
Rgds\
Shree
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shree,
I just finished working my way through the AWT ;
Here's some sample code for working with Checkbox and CheckboxGroup

I don't think there is any way to add a CheckboxGroup, per se, to a container; as it is NOT a component, it inherits directly from Object. Instead, you need to create a CheckboxGroup object, and assign the individual Checkbox items to the group. Then add the Checkbox items to the panel.
Hope that helps.

------------------
Jane
The cure for boredom is curiosity.
There is no cure for curiosity.
-- Dorothy Parker
 
shree vijay
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jane,
It works. Thanks
Rgds,
Shree.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic