Sun Java Solaris Communities My SDN Account Join SDN
 
Tutorials & Code Camps

Selecting Students and Courses

 

Training Index

Selecting Students and Courses

by jGuru

Help  API Docs  About This Short Course  Short Course  Exercises

In this exercise, you will construct a List and a Choice to allow the applet user to select a student name and a course title.

Skeleton Code

Tasks


1. Create a new List component and assign it to the instance variable courseList. Create a new Choice component and assign it to studentChoice.

2. Add the following items to the course list:

Calculus I
Calculus II
Algebraic Topology
Differential Equations
Engineering Math
Geometry

Add the following items to the student choice:

Zach
Mary
Griffin
Miles
Magdelena

3. Add both courseList and the studentChoice to the applet.

Where help exists, the task numbers above are linked to the step-by-step help page.

Solution Source

Demonstration

This exercise only runs within browsers that support the Java Runtime Environment 1.1 and appletviewer. If you are using an appropriate browser, try this exercise. The output should look similar to the following:

SELECTCOURSE.GIF

Next Exercise

Exercises

Short Course

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