Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JCheckbox group

 
murali matapathy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

Any help in the matter is appreciated.

i have four of JCheckboxs.i want to make the first one a select all JCheckBox.
currently i am usuing Buttongroup, but this only makes one of the four check boxes selected.
i want to be able to select any one or two or all of them at discretion.
Also please note that the number of check boxs is not constant and needs to be dynamic.



 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sreekanth india wrote:i have four of JCheckboxs.i want to make the first one a select all JCheckBox.

And you have what problem exactly with that? (and note that the class is JCheckBox, not JCheckbox)

sreekanth india wrote:currently i am usuing Buttongroup, but this only makes one of the four check boxes selected.

That's expected behavior. Have you read the API for ButtonGroup? (Note that it's not Buttongroup)

sreekanth india wrote:i want to be able to select any one or two or all of them at discretion.

So don't add them to a ButtonGroup.

Please go through the topics in How To Ask Questions On Java Ranch where you will learn, among other things, how to use code tags. I'm adding them for you this time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic