Radio buttons


Create two radio buttons that allow a user to choose between two Java courses.

Work Location

Perform all work for this magercise in VisualAge project MageLang Magercises, package magercises.radiobuttons.

If this project does not appear in your Workspace add it from the repository (if it exists there) or create a new project using this name.

Tasks

Perform the following tasks:

  1. Create a new applet called RadioButtons and add a two checkboxes called C++ Programmers and Procedural Programmers or whatever you'd like. Link them to a CheckboxGroup.

    Note that although the checkboxes appear not to be RadioButtons, when you run the applet they'll display properly if they're linked through a CheckBoxGroup bean.

  2. Now add a textfield to the applet such that when a given RadioButton is activated, the contents of the TextField show the RadioButton's label.

The task numbers above are linked to the step-by-step help page. Also available is a complete solution to the problem, and expected behavior, to demonstrate it.

Copyright © 1996-1997 MageLang Institute. All Rights Reserved.