Java Reference
In-Depth Information
The EmpFrame should be displayed and appear as in Figure 3-23 .
6.
From the Console view, end EmployeeApp.
Figure 3-23.
Tutorial: Displaying the Employee Information
EmpFrame needs to be modified so that the employee information is retrieved from the Employee object and placed
in the labels. The information will be retrieved by using the object's getters (via the variable emp that was passed by
EmployeeApp) and each label will be modified using its setText method.
1.
Change the frame title text from “New Frame Title” to “Employee Information.”
2.
After the label's setBounds statements, use each label's setText method to define the label's
text as “New text.”
We will follow the CALTAL rules and verify that our setText statements are working.
3.
Save the code and run EmployeeApp.
The frame should look like Figure 3-24 .
 
Search WWH ::




Custom Search