Java JCheckBoxGroup using applet

import java.applet.*;   
import java.awt.*;
public class program extends Applet
{
    public void init()
    {
        this.add(new Label("What is your favourite programming language ?"));
        CheckboxGroup cbg = new CheckboxGroup();
        this.add(new Checkbox("C", cbg, false));
        this.add(new Checkbox("C++", cbg, false));
        this.add(new Checkbox("JAVA", cbg, true));
        this.add(new Checkbox("PHP", cbg, false));
        this.add(new Checkbox("HTML", cbg, false));
    }
}

Top