Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Swing / AWT / SWT and the fly likes JCheckbox group Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JCheckbox group" Watch "JCheckbox group" New topic
Author

JCheckbox group

murali matapathy
Greenhorn

Joined: Feb 20, 2012
Posts: 1
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

Joined: May 03, 2008
Posts: 4545
    
    5

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.


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JCheckbox group