i need to input text in a textfield like accountbalance,withraw,deposit,and functions of "cancel","Enter","Deposit",Withdraw, and i need to give a receipt after the transaction. i need help you can add in my yahoomail <EMAIL SNIPPED>
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.Scanner;
public class ATM extends JFrame implements ActionListener
{
Bufferedeader br=new BufferedReader(new InputStreamReader(System.in));
String b;
System.out.print("Account Number:");
System.out.print("Account Pin:");
System.out.print("Account Balance:");
Container c=getContentPane();
if(b.equals())
JPanel p1,p2;
JButton b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15;
JTextArea t1;
public ATM()
{
super("ATM");
t1=new JTextArea(" "+);
t1.setMargin(new Insets(50,50,50,50));
t1.setLineWrap(true);
t1.setEditable(true);
}
p1=new JPanel();
p2=new JPanel();
b1=new JButton("1");
b2=new JButton("2");
b3=new JButton("3");
b4=new JButton("4");
b5=new JButton("5");
b6=new JButton("6");
b7=new JButton("7");
b8=new JButton("8");
b9=new JButton("9");
b10=new JButton("0");
b11=new JButton();
b12=new JButton("Deposit");
b12.setBackground(Color.yellow);
b13=new JButton("Withraw");
b13.setBackground(Color.green);
b14=new JButton("Cancel");
b14.setBackground(Color.red);
b15=new JButton("Enter");
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
b5.addActionListener(this);
b6.addActionListener(this);
b7.addActionListener(this);
b8.addActionListener(this);
b9.addActionListener(this);
b10.addActionListener(this);
b12.addActionListener(this);
b13.addActionListener(this);
b14.addActionListener(this);
b15.addActionListener(this);
p1.setLayout(new FlowLayout());
p1.add(t1);
p2.setLayout(new GridLayout(3,4));
p2.add(b1);
p2.add(b2);
p2.add(b3);
p2.add(b4);
p2.add(b5);
p2.add(b6);
p2.add(b7);
p2.add(b8);
p2.add(b9);
p2.add(b10);
p2.add(b11);
p2.add(b12);
p2.add(b13);
p2.add(b14);
p2.add(b15);
setLayout(new GridLayout(2,1));
add(p1);
add(p2);
setSize(400,200);
show();
}
public void actionPerformed(ActionEvent e)
{
String give;
give=t1.getText();
if(e.getSource()==b1)
{
t1.setText(give+"1");
}
if(e.getSource()==b2)
{
t1.setText(give+"2");
}
if(e.getSource()==b3)
{
t1.setText(give+"3");
}
if(e.getSource()==b4)
{
t1.setText(give+"4");
}
if(e.getSource()==b5)
{
t1.setText(give+"5");
}
if(e.getSource()==b6)
{
t1.setText(give+"6");
}
if(e.getSource()==b7)
{
t1.setText(give+"7");
}
if(e.getSource()==b8)
{
t1.setText(give+"8");
}
if(e.getSource()==b9)
{
t1.setText(give+"9");
}
if(e.getSource()==b10)
{
t1.setText(give+"0");
}
if(e.getSource()==b11)
{
t1.setText(give+"0");
}
if(e.getSource()==b12)
{
t1.setText(give+"0");
}
if(e.getSource()==b13)
{
t1.setText(give+"0");
}
if(e.getSource()==b14)
{
JOptionPane.showMessageDialog(null,"Transaction Cancelled");
}
if(e.getSource()==b15)
{
t1.setText(give+"");
}
}
public static void main (String []args)throws Exception
{
new ATM();
}
}