Radio buttons provide a more user friendly environment for
selecting only one option among many. It is a special kind of
checkbox that is used to select only one option.
• In Java’s AWT (Abstract Window Toolkit), there is no dedicated
“RadioButton” class.
• It can be achieve radio button functionality, you need to use
the Checkbox class in conjunction with
a CheckboxGroup object.
RADIO BUTTONS IN AWT
CREATING A RADIO BUTTONS
To create a radio button, you need to:
1. Create a “CheckboxGroup” object to group related radio
buttons.
• 2. Create a “Checkbox” object with the label, checkbox
group, and initial state.
PROGRAM:
OUTPUT:

Radiobutton in AWT Controls ( Java Applet)

  • 1.
    Radio buttons providea more user friendly environment for selecting only one option among many. It is a special kind of checkbox that is used to select only one option. • In Java’s AWT (Abstract Window Toolkit), there is no dedicated “RadioButton” class. • It can be achieve radio button functionality, you need to use the Checkbox class in conjunction with a CheckboxGroup object. RADIO BUTTONS IN AWT
  • 2.
    CREATING A RADIOBUTTONS To create a radio button, you need to: 1. Create a “CheckboxGroup” object to group related radio buttons. • 2. Create a “Checkbox” object with the label, checkbox group, and initial state.
  • 3.
  • 4.