//Java Credit Program import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class Credit extends Applet implements ActionListener { Label promptNum, promptBegBal, promptCharges, promptCredit, promptLimit; //Message tp porompt user TextField acctNum, begBal, totCharges, totCredit, limit; //input values entered here int number, balance, charges, credit, climit; public void init() { promptNum = new Label("Account Number"); add(promptNum); acctNum = new TextField(10); add(acctNum); acctNum.addActionListener(this); promptBegBal = new Label("Beginning Balance"); add(promptBegBal); begBal = new TextField(10); add(begBal); begBal.addActionListener(this); promptCharges = new Label("Charges"); add(promptCharges); totCharges = new TextField(10); add(totCharges); totCharges.addActionListener(this); promptCredit = new Label("Credit"); add(promptCredit); totCredit = new TextField(10); add(totCredit); totCredit.addActionListener(this); promptLimit = new Label("Limit"); add(promptLimit); limit = new TextField(10); add(limit); limit.addActionListener(this); } public void actionPerformed(ActionEvent e) { number = Integer.parseInt(e.getActionCommand()); showStatus(Integer.toString(number)); } }