First thanks in advance for taking the time to open what has had a number of post by others. I have read other postings; however, have not seen a reply that I can relate/understand. The goal of the applet code I am working on shows the monthly mortgage payment based on sum, term & interest. I have tried a number of formulas with no luck. Currently the formula are commented out, if anyone can review some of the formulas a point me in the right direction as to what I may be doing wrong it would be a great help. Thanks in advance.

import java.applet.*; import java.awt.*; import java.awt.event.*; public class MortgagePayment extends Applet implements ActionListener { //decalre variables //Image logo; //declare an Image object int mortgageSum, mortgageTerm, mortgagePayment, mortgageInterest; //double mortgagePayment; //construct components Label companyLabel = new Label("Joey Berrys Mortgage Payment Calculator"); Label loanLabel = new Label("Enter Mortgage Total in Dollars:"); TextField loanField = new TextField(10); Label yearsLabel = new Label ("Enter Mortgage Total Payment Years:"); TextField yearsField = new TextField(10); Label interestLabel = new Label ("Enter Mortgage Interest:"); TextField interestField = new TextField(10); Button calcButton = new Button("Calculate"); Label outputLabel = new Label("Click Calculate Button To Display Mortgage Monthly Payment"); public void init() { setForeground(Color.blue); add(companyLabel); add(loanLabel); add(loanField); add(yearsLabel); add(yearsField); add(interestLabel); add(interestField); add(calcButton); calcButton.addActionListener(this); add(outputLabel); //logo = getImage(getDocumentBase(), "logo.gif"); } public void actionPerformed(ActionEvent e) { mortgageSum = Integer.parseInt(loanField.getText()); mortgageTerm = Integer.parseInt(yearsField.getText()); mortgageInterest = Integer.parseInt(interestField.getText()); //preform payment calculations //double mortgagePayment =(mortgageSum() * (mortgageInterest[1]/100/12)) / (1 - Math.pow(1/(1 + (mortgageInterest[1]/100/12)),mortgageTerm[1]*12)); //double Payment =(loanAmount() * (intRate[1]/100/12)) / (1 - Math.pow(1/(1 + (intRate[1]/100/12)),loanTerm[1]*12)); //mortgagePayment = (mortgageSum*mortgageInterest*Math.pow(1+mortgageInterest, mortgageTerm)/(Math.pow(1+mortgageInterest, mortgageTerm))-1); //mortgagePayment = (mortgageSum*mortgageInterest / (1-Math.pow(1/(1+mortgageInterest),mortgageTerm))); //monthlyPayment = (principal*interestRate*Math.pow(1+interestRate, term)/(Math.pow(1+interestRate, term))-1); //mortgagePayment = (mortgageSum * mortgageInterest * Math.pow(1+mortgageInterest, mortgageSum)/(Math.pow(1+mortgageInterest, mortgageSum))-1); //Display Output outputLabel.setText("The Monthly Mortgage Payment " + mortgagePayment + "."); } public void paint(Graphics g) { g.drawImage(logo,125,160,this); } }