Java Reference
In-Depth Information
Figure 4-19.
27.
Delete the new label and save the source code.
In the source code, notice that all the new setter methods that are invoked to control the appearance of the labels.
The executable code for EmployeeFrame should be the following (if your source code does not match, modify
it so that it does):
package
c4;
import
java.awt.Dimension;
import
java.awt.Color;
import
java.awt.Label;
import
java.awt.Rectangle;
import
java.awt.Point;
import
java.awt.Font;
public class
EmployeeFrame
extends
UsefulFrame {
private
Label nameLbl=
null
;
private
Label streetLbl=
null
;
private
Label cSZLbl=
null
;
private
Employee emp;
public
EmployeeFrame(Employee employee) {
super
();
this
.emp=employee;
initialize();
}