下面这个典型的问题 是我在国外网站上找到的 只不过这个习题也没有给出详细的答案.
问题如下:
Write an application that allows a user to choose insurance options in Checkboxes.Use CheckboxGroup to allow the user to select only one of two insurance types--HMO(health maintenance organization) or PPO(preferred provider organization)[两种不同形式的保险]. Use regular(single)Checkbox for dental insurance and vision insurance options[另外的两种]:the user can select one option, both options, or neither option. As the user selects each option,display[显示] its name and price in a text field; the HMO cost $200, the PPO cost $600 per month, the dental coverage adds $75 per month, and the vision care adds $20 per month. When the user deselects[取消] an item, make the text field blank. Save the program as Insurance.java.
不知道咱们论坛的哪位朋友 有兴趣试着写写解题过程...我想刚开始接触j2se的朋友 都需要这样实际的例子帮助学习..呵呵~
到底CheckboxGroup与Checkbox区别在哪呢?