Purchase Solution


Not what you're looking for?

Ask Custom Question

Write a Java program using a graphical user interface 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 Allow the user to loop back and enter new data or quit. Insert comments in the program to document the program.

Purchase this Solution

Solution Preview

//Note: JBuilder platform used to build GUI code
<br>import java.awt.*;
<br>import java.awt.event.*;
<br>import javax.swing.*;
<br>import com.borland.jbcl.layout.*;
<br>import java.util.*;
<br>public class Frame1 extends JFrame {
<br> JPanel contentPane;
<br> JTextPane jTextPane1 = new JTextPane();
<br> XYLayout xYLayout1 = new XYLayout();
<br> JTextPane jTextPane2 = new JTextPane();
<br> JTextPane jTextPane3 = new JTextPane();
<br> JTextPane jTextPane4 = new JTextPane();
<br> JButton jButton1 = new JButton();
<br> JButton jButton2 = new JButton();
<br> JButton jButton3 = new JButton();
<br> JTextPane jTextPane5 = new JTextPane();
<br> JTextArea jTextArea1 = new JTextArea();
<br> JTextArea jTextArea2 = new JTextArea();
<br> JTextArea jTextArea3 = new JTextArea();
<br> JTextArea jTextArea4 = new JTextArea();
<br> JTextPane jTextPane6 = new JTextPane();
<br> JTextPane jTextPane7 = new JTextPane();
<br> //Construct the frame
<br> public Frame1() {
<br> enableEvents(AWTEvent.WINDOW_EVENT_MASK);
<br> try {
<br> jbInit();
<br> }
<br> catch(Exception e) {
<br> e.printStackTrace();
<br> }
<br> }
<br> //Component initialization
<br> private void jbInit() throws Exception {
<br> contentPane = (JPanel) this.getContentPane();
<br> jTextPane1.setFont(new java.awt.Font("Arial", 1, 16));
<br> jTextPane1.setNextFocusableComponent(null);
<br> jTextPane1.setText("Welcome to Mortgage Calculator");
<br> ...

Purchase this Solution

Free BrainMass Quizzes
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.

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.

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.

Excel Introductory Quiz

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

C++ Operators

This quiz tests a student's knowledge about C++ operators.