Results 1 to 2 of 2
- 03-07-2011, 07:21 PM #1Member
- Join Date
- Feb 2011
- Rep Power
How to save the results for checkbox
I want to save the results user selected for checkboxes.
I have a question which has 10 choices .User selects more than 1.All the choices are available as checkboxes.
Do I have to hard code for each choice i.e have a class name choice.java and have set and get method for all 10 choice .or is there a way to make it dynamic.
Please please help ,I am struggling with it since long.
You could create an ArrayList<JCheckBox> and then use a for loop to iterate through this collection, checking the status of each check box as you go.
- By Rama Koti Reddy in forum AWT / SwingReplies: 2Last Post: 11-01-2010, 09:31 PM
- By aparnakumari in forum AWT / SwingReplies: 3Last Post: 07-27-2010, 09:52 AM
- By boss in forum NetBeansReplies: 3Last Post: 01-17-2010, 05:51 AM
- By nikosa in forum AWT / SwingReplies: 1Last Post: 08-05-2009, 05:01 AM
- By Alan in forum AWT / SwingReplies: 3Last Post: 05-18-2007, 10:10 AM