I notice you are using awt which has been outdated since long. The recommended substitute is swing.
Swing offers 1 to 1 substitute for almost all components. (swing substitutes are typically preceded with a 'J')
Button (AWT) -> JButton (Swing)
Checkbox -> JCheckBox
Panel -> JPanel
In swing, you figure out the user selection via Listeners In pseudo code
Create a JCheckBox Add an ActionListener When notified process the choice.