Question: Write an application that allows the user to choose insurance options in JCheckBoxes. Use a ButtonGroup to allow the user to select only one of
Write an application that allows the user to choose insurance options in JCheckBoxes. Use a ButtonGroup to allow the user to select only one of two insurance types—HMO (health maintenance organization) or PPO (preferred provider organization). Use regular (single) JCheckBoxes 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 costs $200 per month, the PPO costs $600 per month, the dental coverage adds $75 per month, and the vision care adds $20 per month. When a user deselects an item, make the text field blank. Save the file as JInsurance.java.
Step by Step Solution
3.47 Rating (154 Votes )
There are 3 Steps involved in it
JInsurancejava import javaawt import javaxswing import javaawtevent public class JInsurance extends JFrame implements ItemListener FlowLayout flow new ... View full answer
Get step-by-step solutions from verified subject matter experts
