Checkbox group Assignment Help

Assignment Help: >> Controls and Events - Checkbox group

Checkbox group:

A class java.awt.CheckboxGroup can be used to control the behaviour of a group of checkboxes. Like a group just permit a single selection.  By Clicking on a different check box in a group automatically unchecks the previous check box.  Like as mutually exclusive check boxes are frequently called radio buttons.

The following methods return the currently chosen check box and set a particular check box as the current selection in a CheckboxGroup:

CheckboxGroup getSelectedCheckbox( )

void setSelectedChekbox(Checkbox box)

CheckboxGroup object does not have a graphical representation, and it's not a subclass of part. A CheckboxGroup is only a class to implement mutual exclusion between a set of checkboxes.

// Illustration of Radio buttons

import java. awt.*;

import java.applet.*;

public class CheckboxGroupApplet extends Applet

{

public void init ( )

{

CheckboxGroup pizzaGroup = new CheckboxGroup ( );

CheckboxGroup cbLarge = new CheckboxGroup("Large Pan Pizza", pizzaGroup, false);

CheckboxGroup bMedium=new CheckboxGroup("MediumPan Pizza",true,pizzaGroup);

CheckboxGroup cbSmall = new CheckboxGroup("Small Pan Pizza", false);

CbSmall.setCheckboxGroup(pizzaGroup);

add(cbLarge);

add(cbMedium);

add(cbSmall);

}

}

2123_Checkbox group.png

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd