Pos 407 Week1

We have many free term papers and essays on Pos 407 Week1. We also have a wide variety of research papers and book reports available to you for free. You can browse our collection of term papers or use our search engine.

Pos 407 Week1

/**
This is the Week2 Mortgage calculator GUI box for POS 407, calculates loan, rate, and term.
*/

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Week2 implements ActionListener {

JFrame calculatorFrame;
JPanel calculatorPanel;

JTextField loan;
JTextField rate;
JTextField term;

JLabel loanLabel,termLabel, rateLabel, pmtLabel;

JButton calculate;

public Week2() {

if(readData()) {

calculatorFrame = new JFrame("Week 2 Mortgage Calculator");
calculatorFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

calculatorFrame.setBounds(0,0,100,100);

calculatorPanel = new JPanel(new GridLayout(10, 10));

addWidgets();

calculatorFrame.getRootPane().setDefaultButton(calculate);

calculatorFrame.getContentPane().add(calculatorPanel, BorderLayout.
CENTER);

calculatorFrame.pack();
calculatorFrame.setVisible(true);
}
}

private boolean readData() {

boolean isValid = true;
// we don't do anything, we will use this later
return isValid;
}

private void addWidgets() {

loan = new JTextField();
rate = new JTextField();
term = new JTextField();
loanLabel = new JLabel("Loan", SwingConstants.LEFT);
termLabel = new JLabel("Term", SwingConstants.LEFT);
rateLabel = new JLabel("Interest", SwingConstants.LEFT);
calculate = new JButton("Calculate");
pmtLabel = new JLabel("Monthly Payment", SwingConstants.LEFT);

calculate.addActionListener(this);

...
  • Submitted by: bubadutep75
  • Date Submitted: 10/22/2007 06:38 PM
  • Category: Technology
  • Words: 765
  • Pages: 4
  • Views: 268
  • Rank: 39497

Related Essays

  • Pos 407 Week1 POS 407 Week1. /** This is the Week2 Mortgage calculator GUI box for POS 407, calculates loan, rate, and term. */ import java.awt ......

Saved Papers

Save papers so you can find them more easily!

Join Now

Get instant access to over 170,000 papers.

Join Now