Java GUI Mortgage Calculator

Posted on 2011-04-25
Last Modified: 2013-11-24
    I am attemping to write a program that will alllo a user to input information manually or by
selecting a pre-calculated Jbutton.   The Jbutons work but I am stumped on receiving the user
manual information.  Basically the manual input will is not displayed on the result payne

Question by:808KC
    LVL 92

    Accepted Solution

    you need to calculate the payment *after* you have parsed the input

                         areaAmortTable.append ("Payment # \t Remaining Balance \t  Interest Paid\n");
                         loanAmt = Double.parseDouble(fieldLoanAmount.getText());
                         userTerm = Integer.parseInt(fieldTerm.getText());
                         userRate = Double.parseDouble(fieldRate.getText());
                         double paymentAmount = CalculatePayment ();
                         fieldPayment.setText("" + (currency.format(paymentAmount)));

    Author Comment

     Incredible.   I spent a couple  frustrating hours on this.   Thanks

    Author Closing Comment

    Thanks so much  for your help.  I always learn more from yours and this sites expert advice than I do reading books and sitting in a classroom.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
    Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
    Video by: Michael
    Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now