This sample is located in \Samples\afc102\LoanCalc.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
This sample shows how an applet or application can accept input from a wizard and return a complex result. The sample uses a wizard for entering loan parameters. The wizard validates the loan parameters entered at every step before proceeding to the next step. When the data entered is invalid, a message box appears that indicates the error. When the wizard finishes, a column viewer appears that shows the payment schedule for the loan. The loan parameters appear to the left of the column viewer. The parameters displayed in black (Interest Rate and Payment Frequency) must have a value (that is, they cannot be calculated). The remaining parameters appear in either blue (indicating the parameter was entered) or in red (indicating that the parameter was calculated).
To use the sample
You can use the Back and Next buttons at any time to move forward and back through the wizard. Click the Modify Parameters button to invoke the wizard, enter new parameters, and recalculate the payment schedule.
This class extends UIWizard and implements LCConsts. Its getNextStep method validates loan parameters entered in the wizard.
LCCtrlPnl.javaThis class extends UIPanel and implements LCConsts, LCCallbacks, and Runnable. It sets default loan parameters, and creates the Loan Parameters display, the payment schedule display, and the wizard. It also contains methods that set and get wizard input and handle errors in that input.
LCParams.javaThis class implements LCConsts. It does the various calculations by combining wizard input with the constants.