This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi If you are looking to the API, then you will find following little sample code:
As for a short description, imagine you have a bundle of Checkboxes, which belong together, like on and off or some colors. Anyway, there can be only one selection and not several. If you don't want to take RadioButtons with a ButtonGroup, then you can take Checkboxes with a CheckBoxGroup. This group manages, that there can be only one selection in its members.
Joined: Apr 27, 2001
thanks a lot but gave solution in awt. I have written following code, but its allowing multiple checkbox to be selected. ButtonGroup bg=new ButtonGroup(); JButton b1=new JButton("b1"); JButton b2=new JButton("b2"); JButton b3=new JButton("b3"); bg.add(b1);bg.add(b2);bg.add(b3); How could i allow single box to be selected. i.e equivalent of button.setCheckboxGroup() in swing. Yasir
Joined: May 02, 2002
Sorry, I forgot that you need a solution for Swing. Here is the code that you need:
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com