Java

Java Applet - RadioButton Demo

Java Applet - RadioButton Demo
import java.awt.*; 
import java.applet.*; 
import java.awt.event.*; 

public class rad1 extends Applet 
{ 
CheckboxGroup cg; 
Checkbox r1,r2; 


public void init() 
{ 
cg=new CheckboxGroup(); 

r1=new Checkbox("Male",cg,false); 
r2=new Checkbox("Female",cg,false); 


add(r1); 
add(r2); 
} 
} 


/* <body> 
<applet code = "rad1.class" height = 250 width = 250> 
</applet> 
</body> */
Senthilvelan Sambamoorthy

Senthilvelan Sambamoorthy is working as a Professor in Department of Master of Computer Applications, Paavai Engineering College, Namakkal, Tamilnadu, India, He is Masters in Computers Applications. Having 18+ years of experience and his area of interest is Java, JSP, Servlet, J2EE, C#, PHP, Python ASP.NET, SQL Server and etc.