Explore BrainMass

Explore BrainMass

    Java Program with GUI for Mortgages

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Please help write a java program using a graphical user interface that accepts user input of the amount of the mortgage, the term of the mortgage and the interest rate of the mortgage and display the payment. Please use attached Mortgagedisplaycalcultor class diagram (must have the same names in the code) as a guide.

    The display should meeth the following criteria:
    A class called MortgageDisplayGui.java shall be a child of the Jframe.class and will consist of 5 individual Jpanels
    1. ratePanel
    2. termPanel
    3. amountPanel
    4. paymentPanel
    5. buttonPanel

    JPANEL 1-4 will contain two controls each, a JLabel and a JtextField
    JPANEL 5 will contain four controls-each a Jbutton, one to Quit, one to Reset and one to calculate and one to view Amortization.
    JPANEL 1-5 will have a flow layout manager

    The Container of the primary MortgageDisplayGui.java class will have a BoxLayout manager.

    The MortgageDisplayGui.java class will have an init()function that builds the gui. The init() function will be called from the constructor.

    The MortgageDisplayGui.java will be packaged into a src.calculator.gui package

    The Driver.java will be packaged into a src.calculator package

    The Driver class should make and instance of the gui and then display the gui.

    Repackage Calculator classes into src.calculator.util package.

    EXAMPLE GUIDE:

    Pseudo code for init() function of MortgageDisplayGui

    //variables declared as class member variables
    JPanel MortgageAmtPanel = new JPanel();
    JLabel MortgageAmtLabel = new JLabel("Mortgage Amount: ");
    JTextField MortgageAmtText

    Public void init()
    {

    //instantiate loan amount controls
    MortgageAmtPanel = new JPanel();
    MortgageAmtLabel = new JLabel("Mortgage Amount: ");
    MortgageAmtText = new JTextField(16);

    //add layout manager to the panel - flowlayout keeps the controls side by side
    MortgageAmtPanel.setLayout(new FlowLayout());

    //repeat for all panels

    //get and configure container from Jframe parent
    setSize(400, 300);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    Container cont = getContentPane();
    cont.setLayout(new BoxLayout(cont, BoxLayout.PAGE_AXIS));

    //add mortgage amount panel to the container
    cont.add(MortgageAmtPanel );

    }//end init

    © BrainMass Inc. brainmass.com June 7, 2023, 2:44 pm ad1c9bdddf
    https://brainmass.com/computer-science/java/java-program-gui-mortgages-22505

    Attachments

    Solution Preview

    Hello,
    <br>
    <br>If you see the program description, specially in mortgageCalculator, it says that it should show the table as well and provide a button for amortization. so I've implemented that as well along with the features that you desired. In your descrition ...

    $2.49

    Free BrainMass Quizzes

    • Basic Networking Questions

      This quiz consists of some basic networking questions.

    • Java loops

      This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

    • Word 2010: Tables

      Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

    • Excel Introductory Quiz

      This quiz tests your knowledge of basics of MS-Excel.

    • Javscript Basics

      Quiz on basics of javascript programming language.

    View More Free Quizzes