Home | » | Java | » | Advance Java | » | Java AWT (Abstract Window ToolKit) | » | Radio Buttons |
---|
The following program code show how to create a Radio Buttons in Applet Window:
The above code will be stored in the file called RadioButtonTest.java, which on compilation will crate a class file called RadioButton.class. Now compiple this file using below commands in the DOS mode:
C:\>jdk1.4\bin>javac RadioButtonTest.java
C:\>jdk1.4\bin>appletviewer RadioButton.java
|
||
Download Complete Program |
Methods of the CheckboxGroup/RadioButton Object:
getCheckboxGroup() | To access the group of any given check box |
setCheckboxGroup | to change the group of any given check box |
getSelectedCheckbox | Gets the selected checkbox |
setSelectedCheckbox(Checkbox chkbox) | Sets the given checkbox as selected |
AWT Controls
Label | Buttons | Check Boxes | Radio Buttons | |
Choice Controls | TextFields & Password | TextAreas | Scrolling Lists | Scrollbars |
No comments:
Post a Comment