Java Reference
In-Depth Information
Notice that VE selected SimSun as the Font Name. Because there is no Font called Sims, VE chooses the first valid
Font Name that would alphabetically follow the characters specified. In this case, SimSun is alphabetically the first
Font Name that follows the characters Sims.
21.
Click Undo.
Notice that VE resets both the font name and the size.
We still have a little problem. If you look at the source code, notice that the setText statement for cSZLbl defines
the static text of “Jacksonville, FL 32246” for the field. We need to change that back so the employee information is
displayed.
22.
Click Undo Typing until the original setText statement for cSZLbl is inserted.
23.
Specify 26 as the font size of all three labels and save the source code.
“Jacksonville, FL 32246” will now fit, but there is one more problem. Notice that the labels are not centered
horizontally on the frame. When we aligned the labels, it was in relation to each other. The labels need to be aligned
in relation to the frame. It would be nice if we could include the frame in our component selection and then realign.
Unfortunately, the Customize Layout window does not offer any options when a frame is selected as a component.
So, we will do a little “end run" around VE.
24.
Create a label on the frame that spans the entire width of the frame (see Figure 4-18 ).
Figure 4-18.
25.
Select all four labels with the newest label as the anchor.
26.
Display the Customize Layout window and click on the Align center button (first column,
second row).
Because the label was the same width as the frame, the labels will be centered on the frame (see Figure 4-19 ).
Notice that the labels no longer align with the edge of the Exit button.
 
Search WWH ::




Custom Search