You will use the WindowBuilder program the lets users perform monthly payment calculations. The calculations for monthly payment are:
Monthly Payment Calculation
Monthly Payment = [rate + (rate / [[1 + rate] ^ months] ^ -1)] x principal
It's probably easiest to break it down into stages so you can check each stage is giving the right result.
Rate = monthly interest rate (yearly rate / 12)
Months = years of loan * 12
a = 1 + rate
b = Math.pow(a, months)
c = b - 1
d = rate / c
e = rate + d
f = e * loan
Your GUI program should provide a text box for loan amount but drop-down boxes for years and interest rates. Your program should provide a button to perform the calculation and display the results, another button to exit the program, and a third button to save the monthly payment information in an external file.
Your program should check the loan amount input text field and validate the number entered. It should be greater than 0 and less than 1 million. If a non-number is entered your program should display an error message.