ListTest
Prerequisites
In this exercise, you will write an applet that creates and displays a List component.
Perform the following tasks: 
 
 
Create an applet called ListTest.  Define an array of strings, called items, containing strings you want displayed in a List.   Add a new instance of MyList (with arguments "5,items").  
Define the class MyList, as a subclass of List accepting the number of items to display and a list of String objects as the elements of the List.
 
The task numbers above are linked to the
step-by-step help page.  Also available
is a complete solution that meets
these requirements.
Related Exercises
 |