Java Reference
In-Depth Information
14.
In AMPMCh:
Set the values to AM and PM.
Retrieve the current hour.
Using an if statement select AM if the returned value is less than 12 else select PM.
In EnterShipInfo:
15.
Replace the dateTF text field with MonthCh, DayCh, and YearCh components called
monthCh, dayCh, and yearCh. (Hint: In the VE palette, select the Choose Bean option, and
specify c7.MonthCh, then c7.DayCh, etc.)
16.
Replace the TimeTF text field with HourCh, MinCh and AMPMCh components called
hourCh, minCh, and aMPMCh.
The fields should look like Figure 7-5 when displayed.
Figure 7-5.
We will now change the application to check that data is entered in all the text fields and, if data is missing, issue
a message specifying which fields must be supplied. We will also retrieve and format the information from the frame
components.
17.
Move the components so that a new label field (called msgLbl that will be used to display
messages) can fit beneath the Supplier Name and above the Enter button. Set the length to
290, the initial text to blank, center the label and define the alignment as CENTER.
Search WWH ::




Custom Search