Mortgage Calculator (gui)
Essay Preview: Mortgage Calculator (gui)
Report this essay
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
*Change Request #4
Requestor: Ninfa Pendleton – Rapid City, SD
Program: Mortgage Calculator # 4 Week 2 (GUI)
public class Mortgage4 extends JFrame {
/****
* Following will define the controls that we will going to use in the programm
*
*
*
*/
private JLabel labelLoanAmount;
private JLabel labelInterest;
private JLabel labelTerm;
private JTextField textLoanAmount;
private JTextField textInterest;
private JTextField textTerm;
private JLabel labelPMT;
private JLabel labelPMT1;
private JButton btnClaculate;
private JButton btnExit;
private JPanel Contpane;
private JPanel Btnpane;
/*
* Constructor
* Will Initialize All Controls And The It Will Show The GUI Window
*/
public Mortgage4() {
super(“Mortgage Calculator”);
Contpane = new JPanel(new GridLayout(4, 3, 10, 10));
Btnpane = new JPanel(new GridLayout(1, 2, 5, 5));
labelInterest = new JLabel(“Interest rate %”);
labelLoanAmount = new JLabel(“Loan Amount $”);
labelTerm = new JLabel(“Terms In Years”);
labelPMT = new JLabel(“Monthly Payment Is $ “);
labelPMT1 = new JLabel(“0.00”);
textInterest = new JTextField();
textLoanAmount = new JTextField();
textTerm = new JTextField();
//Action Listner For Calculate Button
Action calculateAction = new AbstractAction(“Calculate”) {

Get Your Essay

Cite this page

Private Jlabel Labelloanamount And New Jpanel. (April 19, 2021). Retrieved from https://www.freeessays.education/private-jlabel-labelloanamount-and-new-jpanel-essay/