Java Reference
In-Depth Information
In the source code, change the actionPerformed method to:
16.
Read each text field and set the appropriate Shipment object property.
17.
Create a new ShipmentFrame object and assign it to a variable called sf.
In ShipmentApp:
18.
Comment out the two statements in the main method.
19.
Add a statement to create a new EnterShipInfo object and assign it to a variable called esi.
Results of the Review Exercise
Here's what we've got after the review exercise:
1.
In the ReviewEx project, one new package called c5.
2.
One new visual class called EnterShipInfo specified as above.
3.
ShipmentApp modified to create an EnterShipInfo object.
Check that the Exercise Was Done Correctly
Now we can test:
1.
Run ShipmentApp and verify the Enter Ship Information frame appears.
2.
Enter information into the text fields and click the Enter button.
3.
The Shipment frame should be displayed.
4.
Click the Display button, and the information entered on the Enter Ship Information frame
should be displayed in the three labels with the appropriate text. As an example, see Figure 5-13 .
Figure 5-13.
 
Search WWH ::




Custom Search