Java Reference
In-Depth Information
The sort() method will be tested again when new information is inserted.
Testing the Addition of a DVD Title
The following steps test the Insert New DVD command by inserting a new
DVD title, studio, and year.
To Test the Insert New DVD Command
1. If necessary, run the program again by clicking Run Java Application on
the Tools menu. Click Edit on the menu bar and then click Insert New
DVD.
The program displays the first of three input dialog boxes (Figure 7-43).
Input
dialog box
insertion
point
text box
OK button
FIGURE 7-43
2. Type Dr. Strangelove in the text box and then click the OK button.
When the input dialog box asking for the studio is displayed, type
Columbia and then click the OK button. When the input dialog box
asking for the year is displayed, type 1964 and then click the OK button.
The program automatically displays the new data sorted by title in the list
(Figure 7-44).
new movie
inserted
alphabetically
FIGURE 7-44
 
Search WWH ::




Custom Search