Java Reference
In-Depth Information
29.
Modify the Shipment constructor that receives the ship number string so that the
shipment number is moved into the class variable shipmentNumber and getShipInfo is
invoked as follows:
public Shipment(String sNum) {
this .setShipmentNum(sNum);
this .getShipInfo(sNum);
}
30.
In EnterShipInfo, change the name of the enterBtn to actionBtn.
31.
In EnterShipInfo, change the definition of the class variable ship from:
public Shipment ship;
to :
private Shipment ship = new Shipment();
and, in the initialize, method comment out the following:
ship = new Shipment("","","","","");
32.
In EnterShipInfo, create a populateTFs method (as was done in EnterEmpInfo) so that
the Shipment text fields and the choice values from the Shipment object are displayed.
Change EnterShipInfo's constructor that accepts a Shipment and a String variable
(as follows), so that the shipment information is put in the labels and the button has
the correct text:
33.
public EnterShipInfo(Shipment ship, String func) {
this ();
this .ship = ship;
populateTFs();
actionBtn.setLabel(func);
}
34.
In the EnterShipInfo setShipmentProperties method, after the new shipment object is
created also set the six individual properties that make up the receiving date and time.
35.
Change EnterShipInfo's actionPerformed method so the correct doXxxx methods are
called for the functions insert, update and delete and that appropriate message text is
displayed for each operation.
36.
Change EnterShipInfo's actionPerformed method so that a ShipmentFrame object is
created when the display function has been selected.
37.
Save all the source code.
Search WWH ::




Custom Search