Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
Print Button
 

Help is available for each task.



    Task 1

    Create a Panel instance and add three components to it:

    1. The label "Java is: "
    2. A checkbox labeled "Powerful"
    3. A checkbox labeled "Elegant"

    The two Checkbox objects should be under the control of a CheckboxGroup object.

    Add the panel to the applet.


    Add a Label instance first. Then, create a CheckboxGroup object and add the two Checkbox objects, both associated with the CheckboxGroup object.

    Task 2

    Register and listen for events in the RadioButtons applet in order to display the label of the activated checkbox in the TextField object (already provided). (RadioButtons should implement the ItemListener interface.)


    Fill in method itemStateChanged() so that it sets the text of the TextField with the method setText(). Use getSelectedObjects() to get the text of a checkbox's label.

Copyright 1996-2000 jGuru.com. All Rights Reserved.


Print Button
[ This page was updated: 15-Jul-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.