Purchase Solution

Java Programming Mortgage

Not what you're looking for?

Ask Custom Question

Please help me create a GUI with 3 JTextField (one for loan amount, one for term, and one for interest rate), one JTextArea (where the monthly payment schedule will be displayed; appended for each month, for all moths; attach a JScrollPane to the JTextArea), one JComboBox (with 3 selections: 7 year at 5.35%, 15 year at 5.5 %, 30 year at 5.75%), and 3 JButton (one for computing the monthly payment schedule, one for resetting all fields, and one for exit the application). The user should be able to input in the text fields the loan amount, interest rate, and term, or input the loan amount in a text field and then select from the combo box the type of loan.

Purchase this Solution

Solution Summary

This solution helps with java programming.

Solution Preview

Please see the attached file.

// Mortgage.java

import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.text.*;
import java.util.*;

public class Mortgage extends JApplet {
private String[] terms={"7","15","30"};
private double[] rates={0.0535,0.055,0.0575};
private JLabel amountLabel=new JLabel("Loan amount: ");
private JTextField amount=new JTextField();
private JLabel termLabel=new JLabel("Term: ");
private JTextField term=new JTextField();
private JLabel rateLabel=new JLabel("Interest rate: ");
private JTextField rate=new JTextField();
private JComboBox termList = new JComboBox(terms);
private JLabel payLabel=new JLabel("Monthly Payment: ");
private JLabel payment=new JLabel();
private JButton calculate=new JButton("Calculate");
private JButton clear=new JButton("Clear");
private JButton exit=new JButton("Exit");
private JTextArea paymentSchedule=new JTextArea();
private JScrollPane schedulePane=new JScrollPane(paymentSchedule);
private Container cp = ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Javscript Basics

Quiz on basics of javascript programming language.

Excel Introductory Quiz

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