Java Reference
In-Depth Information
6.
Add three labels called shipLbl, empLbl, and dateTimeLbl to the bottom half of the frame
with the following properties:
300 by 20 in size
Centered horizontally on the frame
Separated from each other vertically by 10 pixels
The last label should be separated from the displayButton by 15 pixels
The label text color should be defined with RGB values of 0, 0, 153 and be centered
within the label
In VE, the frame should look like Figure 4-21 .
Figure 4-21.
In the ShipmentFrame source code:
1.
Create a public class variable of type Shipment called ship.
2.
Change the constructor so that it receives a Shipment object called s.
3.
In the constructor, after the initialization method is run set ship equal to s.
4.
Make the frame visible.
5.
In the initialize method, recalculate the location of the Exit button.
6.
Add the ActionListener to displayButton by inserting the following statement in the
getDisplayButton method after the size is set:
displayButton.addActionListener( this );
Search WWH ::




Custom Search