Following is the declaration for javax.swing.JRadioButton class −. The AWT Widget used to create a radio button is Checkbox. One expects it to be a container or a component, but it isn’t; it’s simply a helper object that allows only one RadioButton to be selected at a time. Radio Button in Java. The event demonstration program for JToggleButton: 10. More than Java 400 questions with detailed answers. Write a java program which illustrates the concept of Radio Button? Steps for converting checkboxes into radiobutton: 1. Create objects of CheckboxGroup class. AWT includes all classes to write the program that acts as an interface between the user and various windowing toolkits. Java AWT CheckboxGroup. Button demo: Mnemonic, alignment and action command : 13. buttons, labels,... from java.awt. java.awt we have a predefined class called CheckboxGroup through which we can add all the checkboxes to the object of CheckboxGroup class. It is used to choose one option from multiple options. In Java AWT, one can create Radio Buttons just like check boxes. After learning about Radio button and Radio button group let us go for the event handling. Import appropriate packages for GUI components (java.awt. ; Swing ToolTip Tutorial with Example - In this tutorial, we will learn how to add tooltip text to a Swing component. Enter your email address below to join 1000+ fellow learners: Create AWT Radio Buttons Using CheckboxGroup Example, This java example shows how to create radio buttons using AWT CheckboxGroup,