import javax.swing.
*;
import java.awt.*;
import java.awt.event.*;
public class Transactions extends JFrame implements ActionListener{
JButton deposit, withdrow1, miniStatement, pinchange, fastCash, balanceEnquiry,
exit;
String pinnumber;
Transactions(String pinnumber) {
this.pinnumber = pinnumber;
setLayout(null);
ImageIcon i1 = new
ImageIcon(ClassLoader.getSystemResource("icons/29665834.jpg"));
Image i2 = i1.getImage().getScaledInstance(850, 850, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(0, 0, 850, 850);
add(image);
JLabel text = new JLabel("please select your transaction");
text.setBounds(210, 310, 700, 35);
text.setForeground(Color.BLACK);
text.setFont(new Font("System", Font.BOLD, 16));
image.add(text);
deposit = new JButton("Deposit");
deposit.setBounds(195, 355, 140, 30);
deposit.addActionListener(this);
image.add(deposit);
withdrow1 = new JButton("cash withdrow1");
withdrow1.setBounds(380, 355, 140, 30);
withdrow1.addActionListener(this);
image.add(withdrow1);
fastCash = new JButton("fast cash");
fastCash.setBounds(195, 390, 140, 30);
fastCash.addActionListener(this);
image.add(fastCash);
miniStatement = new JButton("Mini Statement");
miniStatement.setBounds(380, 390, 140, 30);
miniStatement.addActionListener(this);
image.add(miniStatement);
pinchange = new JButton("pin change");
pinchange.setBounds(195, 425, 140, 30);
pinchange.addActionListener(this);
image.add(pinchange);
balanceEnquiry = new JButton("Balance Enquiry");
balanceEnquiry.setBounds(380, 425, 140, 30);
balanceEnquiry.addActionListener(this);
image.add(balanceEnquiry);
exit = new JButton("Exit");
exit.setBounds(380, 460, 140, 30);
exit.addActionListener(this);
image.add(exit);
setSize(900, 900);
setLocation(300, 0);
setUndecorated(true);
setVisible(true);
}
public void actionPerformed(ActionEvent ae){
if(ae.getSource() == exit){
System.exit(0);
}
public static void main(String[] args){
new Transactions("");
}
}
//creating login class
package icons;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Login extends JFrame implements ActionListener {
JButton login, signup, clear;
JTextField cardTextField;
JPasswordField pinTextField;
Login(){
setTitle("AUTOMATED TELLER MACHINE");
setLayout(null);
ImageIcon i1 = new
ImageIcon(ClassLoader.getSystemResource("icons/logo.png"));
Image i2 = i1.getImage().getScaledInstance(100,100,Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel label = new JLabel(i3);
label.setBounds(70,10,100,100);
add(label);
JLabel text = new JLabel("Welcome to ATM");
text.setFont(new Font("Osward", Font.BOLD,30));
text.setBounds(200,40,400,40);
add(text);
JLabel cardno = new JLabel("Card NO:");
cardno.setFont(new Font("Raleway", Font.BOLD,28));
cardno.setBounds(120,150,150,30);
add(cardno);
cardTextField = new JTextField();
cardTextField.setBounds(300,150,250,30);
cardTextField.setFont(new Font("Arial", Font.BOLD,14));
add(cardTextField);
JLabel pin = new JLabel("PIN:");
pin.setFont(new Font("Raleway", Font.BOLD,28));
pin.setBounds(120,220,250,30);
add(pin);
pinTextField = new JPasswordField();
pinTextField.setBounds(300,220,230,30);
pinTextField.setFont(new Font("Arial",Font.BOLD,14));
add(pinTextField);
login = new JButton("SIGN IN");
login.setBounds(300,300,100,30);
login.setBackground(Color.BLACK);
login.setForeground(Color.WHITE);
login.addActionListener(this);
add(login);
clear = new JButton("CLEAR");
clear.setBounds(430,300,100,30);
clear.setBackground(Color.BLACK);
clear.setForeground(Color.WHITE);
clear.addActionListener(this);
add(clear);
signup = new JButton("SIGN UP");
signup.setBounds(300,350,230,30);
signup.setBackground(Color.BLACK);
signup.setForeground(Color.WHITE);
signup.addActionListener(this);
add(signup);
getContentPane().setBackground(Color.WHITE);
setSize(800,480);
setVisible(true);
setLocation(350,200);
}
public void actionPerformed(ActionEvent ae){
if(ae.getSource() == clear){
cardTextField.setText("");
pinTextField.setText("");
}
else if(ae.getSource() == login){
}
else if(ae.getSource() == signup){
}
public static void main(String[] args){
new Login();
}
}