0% found this document useful (0 votes)
249 views

Bank Management System Project File1

This document provides an overview of a project to develop a "Bank Management System" using Java programming language. The key points are: 1) The project aims to develop a model internet banking site that allows customers to perform basic banking transactions remotely through a secure website. 2) The system will provide functionality for customers to open accounts, deposit/withdraw funds, and view account reports. 3) The primary goal is to design a modular system that can be easily expanded and modified to meet the changing needs of banking.

Uploaded by

Kharoud
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
249 views

Bank Management System Project File1

This document provides an overview of a project to develop a "Bank Management System" using Java programming language. The key points are: 1) The project aims to develop a model internet banking site that allows customers to perform basic banking transactions remotely through a secure website. 2) The system will provide functionality for customers to open accounts, deposit/withdraw funds, and view account reports. 3) The primary goal is to design a modular system that can be easily expanded and modified to meet the changing needs of banking.

Uploaded by

Kharoud
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 62

PUBLIC COLLEGE SAMANA

Project Report on
“BANK MANAGEMENT SYSTEM”
Java Programming Language
B.c.a III Year

Submitted To: Submitted By:


Prof. Gurjinder Nagi Simran Kashyap; Komalpreet Kaur

Introduction:
The “Bank Account Management System” project is a model Internet Banking Site. This site
enables the customers to perform the basic banking transactions by sitting at their office or at
homes through PC or laptop. The system provides the access to the customer to create an
account, deposit/withdraw the cash from his account, also to view reports of all accounts present.
The customers can access the banks website for viewing their Account details and perform the
transactions on account as per their requirements. With Internet Banking, the brick and mortar
structure of the traditional banking gets converted into a click and portal model, thereby giving a
concept of virtual banking a real shape. Thus, today's banking is no longer confined to branches.
E-banking facilitates banking transactions by customers round the clock globally.

The primary aim of this “Bank Account Management System” is to provide an improved design
methodology, which envisages the future expansion, and modification, which is necessary for a
core sector like banking. This necessitates the design to be expandable and modifiable and so a
modular approach is used in developing the application software.

Anybody who is an Account holder in this bank can become a member of Bank Account
Management System. He has to fill a form with his personal details and Account Number.
Bank is the place where customers feel the sense of safety for their property. In the bank,
customers deposit and withdraw their money. Transaction of money also is a part where
customer takes shelter of the bank. Now to keep the belief and trust of customers, there is the
positive need for management of the bank, which can handle all this with comfort and ease.
Smooth and efficient management affects the satisfaction of the customers and staff members,
indirectly. And of course, it encourages management committee in taking some needed decision
for future enhancement of the bank.

Nowdays, managing a bank is tedious job up to certain limit. So software that reduces the work
is essential. Also, today’s world is a genuine computer world and is getting faster and faster day-
by-day. Thus, considering above necessities, the software for bank management has become
necessary which would be useful in managing the bank more efficiently.
All transactions are carried out online by transferring from accounts in the same Bank or
international bank. The software is meant to overcome the drawbacks of the manual system.

AIM of this project

The main aim of designing and developing this Internet banking System Java primarily based
Engineering project is to provide secure and efficient net banking facilities to the banking
customers over the internet. Apache Server Pages, MYSQL database used to develop this bank
application where all banking customers can login through the secured web page by their account
login id and password. Users will have all options and features in that application like get money
from western union, money transfer to others, and send cash or money to inter banking as well as
other banking customers by simply adding them as payees.

Main Purpose
The Traditional way of maintaining details of a user in a bank was to enter the details and record
them. Every time the user needs to perform some transactions he has to go to bank and perform
the necessary actions, which may not be so feasible all the time. It may be a hard-hitting task for
the users and the bankers too. The project gives real life understanding of Online Banking
System and activities performed by various roles in the supply chain. Here, we provide
automation for banking system through Internet. Online Banking System project captures
activities performed by different roles in real life banking which provides enhanced techniques
for maintaining the required information up-to-date, which results in efficiency. The project gives
real life understanding of Online Banking System and activities performed by various roles in the
supply chain
Main Goal

1. Motto- Our motto is to develop a software program for managing the entire bank process
related to Administration accounts customer accounts and to keep each every track about their
property and their various transaction processes efficiently.
Hereby, our main objective is the customer’s satisfaction considering today’s faster in the world.

2. Customer Satisfaction: Client can do his operations comfortably without any risk or losing of
his privacy. Our software will perform and fulfill all the tasks that any customer would desire.

3. Saving Customer Time: Client doesn't need to go to the bank to do small operation.

4. Protecting the Customer: It helps the customer to be satisfied and comfortable in his choices,
this protection contains customer’s account, money and his privacy.

5. Transferring Money: Help client transferring money to/or another bank or country.

Methods

 We need to be able to generate an account number


 Account types: Savings or Current Account
 Maintain/update Balance
 Open/Close Account
 Withdraw/Deposit

Administrative Modules

Here in my project there are two types of modules. This module is the main module which
performs all the main operations in the system. The major operations in the system are:

Admin Module

Admin can access this project there is an authorization process. If you login as an Admin then
you will be redirected to the Admin Home Page and if you are a simple user you will be
redirected to your Account Home Page. This performs the following functions: Create
Individual Accounts, manage existing accounts, View all transactions, Balance enquiry,
Delete/close account etc.

1- Admin login
2- Add/delete/update account
3- Withdrawal/deposit/statements transaction
4- Account Information
5- User details list
6- Active/Inactive account
7- View transaction histories

User Module

A simple user can access their account and can deposit/withdraw money from their account.
User can also transfer money from their account to any other bank account. User can see their
transaction report and balance enquiry too.

1- User login, use PIN system


2- Creating/open new account registration
3- Funds transfer (local/international/domestic)
4- View statements transaction
5- User account details
6- Change Password and Pin

Banks terms:

1. All requests received from customers are logged for backend fulfillment and are effective from
the time they are recorded at the branch.
2. Rules and regulations applicable to normal banking transactions in India will be applicable
mutatis mutandis for the transactions executed through this site.
3. The BAMS Bank service cannot be claimed as a right. The bank may also convert this into a
discretionary service anytime.
4. Dispute between the customer and the Bank in this service is subject to the jurisdiction of the
courts in the Republic of India and governed by the laws prevailing in India.
5. The Bank reserves the right to modify the services offered or the Terms of service of
BAMS Bank. The changes will be notified to the customers through a notification on the Site.

Customer’s obligations

1. The customer has an obligation to maintain secrecy in regard to Username &


Password registered with the Bank. The bank presupposes that login using valid
Username and Password is a valid session initiated by none other than the customer.
2. Transaction executed through a valid session will be construed by RR to have emanated from
the registered customer and will be binding on him/her.
3. The customer will not attempt or permit others to attempt accessing the BAMS Bank through
any unlawful means.

Benefits of online banking


Many of us lead busy lives. Some of us are up before the crack of dawn, getting ourselves
prepared so we can in turn get our families ready for the day. We rush to work, rush to get the
kids to school, and at the end of the day we rush home only to brace ourselves for the next day.
After a hectic day, the last thing you want to do is spend time waiting in line at the bank, or even
the post office. That's where Online Banking comes in. Many of the benefits of doing our
banking online are obvious:

1- You don't have to wait in line.


2- You don't have to plan your day around the bank's hours.
3- You can look at your balance whenever you want, not just when you get a statement.

There are some hidden benefits too. As a young bank customer, you're just learning how to
manage your money and observe your spending patterns.
Online banking allows you to watch your money on a daily basis if you want to. By keeping
close tabs on your funds, you'll always be aware of what's happening in your bank account.
For those experienced spenders, this option is far more appealing than the sudden discovery that
you're broke!

It's also helpful to watch how much interest you're gathering on investments and savings or what
service charges you have incurred.

Most available benefits

1. Online banking with key bank is fast, secure, convenient and free.
2. Quick, simple, authenticated access to accounts via the web application.
3. Simply scalable to grow with changing system requirement.
4. Global enterprise wide access to information.
5. Improved data security, restricting unauthorized access.
6. Minimize Storage Space.

Future Look

The “Banking Online System is a big and ambitious project. I am thankful for being provided
this great opportunity to work on it. As already mentioned, this project has gone through
extensive research work. On the basis of the research work, we have successfully designed and
implemented banking online System. To know what the future of online banking looks like, it’s
probably worth looking at the present – online banking isn’t new. When you think of online
banking, you probably think about a computer (either a desktop or laptop), a three or four step
security process and then an interface that lets you view the balance of your various bank
accounts and credit cards, whilst permitting you to transfer money and pay bills. And you’re not
wrong either. The most valuable future looks are following below:

1- More branches of the bank, maybe it will be international, that means more ATM machines
outside.
2- Customer issues development based on their needs, so the help desk will be aware of their
needs and easy to use.
3- Developing a mobile App for banking system that help users to do the obtained his operations
without go to the bank only he needs to sign in using his A/C NO. And password and then use
your own PIN. Finally the system will update automatically.

Conclusion
This project is developed to nurture the needs of a user in a banking sector by embedding all the
tasks of transactions taking place in a bank. Future version of this project will still be much
enhanced than the current version. Writing and depositing checks are perhaps the most
fundamental ways to move money in and out of a checking account, but advancements in
technology have added ATM and debit card transactions. All banks have rules about how long it
takes to access your deposits, how many debit card transactions you're allowed in a day, and how
much cash you can withdraw from an ATM. Access to the balance in your checking account can
also be limited by businesses that place holds on your funds.

Banks are providing internet banking services also so that the customers can be attracted. By
asking the bank employs we came to know that maximum numbers of internet bank account
holders are youth and business man. Online banking is an innovative tool that is fast becoming a
necessity. It is a successful strategic weapon for banks to remain profitable in a volatile and
competitive marketplace of today. If proper training should be given to customer by the bank
employs to open an account will be beneficial secondly the website should be made friendlier
from where the customers can directly make and access their accounts.
Thus, the Bank Management System it is developed and executed successfully.

Reference

1. Online Bank Account Management System


Website: http://www.slideshare.net (Collect some info for report documents)

Source Code
Login java
package bank.management.system;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
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.jpg"));
Image i2 =i1.getImage().getScaledInstance(100,100, Image.SCALE_DEFAULT);
ImageIcon i3= new ImageIcon(i2);
JLabel label= new JLabel(i3);
label.setBounds(110,10,100,100);
add(label);

JLabel text = new JLabel("Welcome to ATM");


text.setFont(new Font("Osward",Font.BOLD,38));
text.setBounds(250,40,400,40);
add (text);

JLabel cardno = new JLabel("Card No:");


cardno.setFont(new Font("Raleway",Font.BOLD,28));
cardno.setBounds(120,150,150,40);
add (cardno);

cardTextField = new JTextField();


cardTextField.setBounds(300,150,230,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(750,480);
setVisible(true);
setLocation (350,200);
}

public void actionPerformed(ActionEvent ae){


if (ae.getSource()== clear) {
cardTextField.setText("");
pinTextField.setText("");

} else if (ae.getSource()== login){


Conn conn = new Conn();
String cardnumber = cardTextField.getText();
String pinnumber = pinTextField.getText();
String query = "select* from login where cardnumber = '"+cardnumber+"'and pin =
'"+pinnumber+"'";
try{
ResultSet rs = conn.s.executeQuery(query);
if (rs.next()){
setVisible(false);
new Transactions(pinnumber).setVisible(true);
}else
{
JOptionPane.showMessageDialog(null,"Incorrect Card Number or Pin");
}
}catch(Exception e){
System.out.println(e);
}

}else if(ae.getSource()==signup){
setVisible(false);
new SignupOne().setVisible(true);
}
}
public static void main(String args[]) {
new Login();
}
}

Conn.Java
package bank.management.system;

import java.sql.*;
public class Conn {

Connection c;
Statement s;
public Conn(){
try{
c=
DriverManager.getConnection("jdbc:mysql:///bankmanagementsystem","root","simi4468@");
s = c.createStatement();

}catch (Exception e){


System.out.println(e);
}

}
}

SignUpOne.Java
package bank.management.system;

import javax.swing.*;
import java.awt.*;
import java.util.*;
import com.toedter.calendar.JDateChooser;
import java.awt.event.*;

public class SignupOne extends JFrame implements ActionListener{

long random;
JTextField nameTextField, fnameTextField, dobTextField, emailTextField,
addressTextField,cityTextField, stateTextField, pinTextField;
JButton next;
JRadioButton male, female, married, unmarried,other;
JDateChooser dateChooser;
SignupOne(){

setLayout(null);

Random ran = new Random();


random =(Math.abs((ran.nextLong()% 9000L)+1000L));

JLabel formno = new JLabel("APPLICATION FORM NO."+ random);


formno.setFont(new Font("raleway", Font.BOLD,38));
formno.setBounds(140,20,600,40);
add(formno);

JLabel personalDetails = new JLabel("Page 1: Personal Details");


personalDetails.setFont(new Font("raleway", Font.BOLD,24));
personalDetails.setBounds(290,80,400,30);
add(personalDetails);

JLabel name = new JLabel("Name:");


name.setFont(new Font("raleway", Font.BOLD,20));
name.setBounds(100,140,100,30);
add(name);

nameTextField = new JTextField();


nameTextField.setFont(new Font("Raleway", Font.BOLD, 14));
nameTextField.setBounds(300,140,400,30);
add(nameTextField);

JLabel fname = new JLabel("Father's Name:");


fname.setFont(new Font("raleway", Font.BOLD,20));
fname.setBounds(100,190,200,30);
add(fname);

fnameTextField = new JTextField();


fnameTextField.setFont(new Font("Raleway", Font.BOLD, 14));
fnameTextField.setBounds(300,190,400,30);
add(fnameTextField);

JLabel dob = new JLabel("Date Of Birth:");


dob.setFont(new Font("raleway", Font.BOLD,20));
dob.setBounds(100,240,200,30);
add(dob);

dateChooser = new JDateChooser();


dateChooser.setBounds(300,240,400,30);
dateChooser.setForeground(new Color(105,105,105));
add(dateChooser);

JLabel gender = new JLabel("Gender:");


gender.setFont(new Font("raleway", Font.BOLD,20));
gender.setBounds(100,290,200,30);
add(gender);

male = new JRadioButton("Male");


male.setBounds(300,290,60,30);
male.setBackground(Color.WHITE);
add (male);
female = new JRadioButton("Female");
female.setBounds(450,290,120,30);
female.setBackground(Color.WHITE);
add (female);

ButtonGroup gendergroup = new ButtonGroup();


gendergroup.add(male);
gendergroup.add(female);

JLabel email = new JLabel("Email Address:");


email.setFont(new Font("raleway", Font.BOLD,20));
email.setBounds(100,340,200,30);
add(email);

emailTextField = new JTextField();


emailTextField.setFont(new Font("Raleway", Font.BOLD, 14));
emailTextField.setBounds(300,340,400,30);
add(emailTextField);

JLabel marital = new JLabel("Marital Status:");


marital.setFont(new Font("raleway", Font.BOLD,20));
marital.setBounds(100,390,200,30);
add(marital);

married = new JRadioButton("Married");


married.setBounds(300,390,100,30);
married.setBackground(Color.WHITE);
add (married);
unmarried = new JRadioButton("Unmarried");
unmarried.setBounds(450,390,100,30);
unmarried.setBackground(Color.WHITE);
add (unmarried);

other = new JRadioButton("Other");


other.setBounds(630,390,100,30);
other.setBackground(Color.WHITE);
add (other);

ButtonGroup maritalgroup = new ButtonGroup();


maritalgroup.add(married);
maritalgroup.add(unmarried);
maritalgroup.add(other);

JLabel address = new JLabel("Address:");


address.setFont(new Font("raleway", Font.BOLD,20));
address.setBounds(100,440,200,30);
add(address);

addressTextField = new JTextField();


addressTextField.setFont(new Font("Raleway", Font.BOLD, 14));
addressTextField.setBounds(300,440,400,30);
add(addressTextField);

JLabel city = new JLabel("City:");


city.setFont(new Font("raleway", Font.BOLD,20));
city.setBounds(100,490,200,30);
add(city);
cityTextField = new JTextField();
cityTextField.setFont(new Font("Raleway", Font.BOLD, 14));
cityTextField.setBounds(300,490,400,30);
add(cityTextField);

JLabel state = new JLabel("State:");


state.setFont(new Font("raleway", Font.BOLD,20));
state.setBounds(100,540,200,30);
add(state);

stateTextField = new JTextField();


stateTextField.setFont(new Font("Raleway", Font.BOLD, 14));
stateTextField.setBounds(300,540,400,30);
add(stateTextField);

JLabel pincode = new JLabel("Pin Code:");


pincode.setFont(new Font("raleway", Font.BOLD,20));
pincode.setBounds(100,590,200,30);
add(pincode);

pinTextField = new JTextField();


pinTextField.setFont(new Font("Raleway", Font.BOLD, 14));
pinTextField.setBounds(300,590,400,30);
add(pinTextField);

next = new JButton("Next");


next.setBackground(Color.BLACK);
next.setForeground(Color.WHITE);
next.setFont(new Font("Raleway",Font.BOLD,14));
next.setBounds(620,660,80,25);
next.addActionListener(this);
add(next);

getContentPane().setBackground(Color.white);

setSize(850,800);
setLocation(350,10);
setVisible(true);
}
public void actionPerformed(ActionEvent ae){

String formno = "" + random;//long


String name = nameTextField.getText();//setText
String fname = fnameTextField.getText();
String dob = ((JTextField) dateChooser.getDateEditor().getUiComponent()).getText();
String gender = null;
if (male.isSelected()) {
gender = "Male";
} else if (female.isSelected()) {
gender ="Female";
}

String email = emailTextField.getText();


String marital = null;
if (married.isSelected()) {
marital = "Married";
} else if (unmarried.isSelected()) {
marital = "Unmarried";
}else if (other.isSelected()) {
marital ="Other";
}
String address = addressTextField.getText();
String city = cityTextField.getText();
String state = stateTextField.getText();
String pin = pinTextField.getText();

try{
if(name.equals("")) {
JOptionPane.showMessageDialog(null,"Name is Required");
}else{
Conn c = new Conn();
String query = "insert into signup values('"+formno+"', '"+name+"', '"+fname+"',
'"+dob+"', '"+gender+"', '"+email+"', '"+marital+"', '"+address+"', '"+city+"', '"+state+"',
'"+pin+"')";
c.s.executeUpdate(query);
setVisible(false);
new SignupTwo(formno).setVisible(true);
}

}catch(Exception e){
System.out.println(e);
}

}
public static void main(String args[]) {
new SignupOne();
}
}

SignUpTwo.Java
package bank.management.system;

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

public class SignupTwo extends JFrame implements ActionListener {

JTextField pan, aadhar;


JButton next;
JRadioButton syes, sno, eyes, eno;
JComboBox religion, category, occupation, education, income;
String formno;

SignupTwo(String formno) {
this.formno = formno;

setLayout(null);

setTitle("NEW ACCOUNT APPLICATION FORM - PAGE 2");

JLabel additionalDetails = new JLabel("Page 2: Additional Details");


additionalDetails.setFont(new Font("raleway", Font.BOLD, 24));
additionalDetails.setBounds(290, 60, 400, 30);
add(additionalDetails);

JLabel name = new JLabel("Religion:");


name.setFont(new Font("raleway", Font.BOLD, 20));
name.setBounds(100, 140, 100, 30);
add(name);

String valReligion[] = {"Hindu", "Muslim", "Sikh", "Christian", "Other"};


religion = new JComboBox(valReligion);
religion.setBounds(300, 140, 400, 30);
religion.setBackground(Color.WHITE);
add(religion);

JLabel fname = new JLabel("Category:");


fname.setFont(new Font("raleway", Font.BOLD, 20));
fname.setBounds(100, 190, 200, 30);
add(fname);

String valcategory[] = {"General", "OBC", "SC", "ST", "Other"};


category = new JComboBox(valcategory);
category.setBounds(300, 190, 400, 30);
category.setBackground(Color.white);
add(category);

JLabel dob = new JLabel("Income:");


dob.setFont(new Font("raleway", Font.BOLD, 20));
dob.setBounds(100, 240, 200, 30);
add(dob);
String incomecategory[] = {"Null", "< 1,50,000", "< 2,50,000", "< 5,00,000", "Upto
10,00,000"};
income = new JComboBox(incomecategory);
income.setBounds(300, 240, 400, 30);
income.setBackground(Color.white);
add(income);

JLabel gender = new JLabel("Educational");


gender.setFont(new Font("raleway", Font.BOLD, 20));
gender.setBounds(100, 290, 200, 30);
add(gender);

JLabel email = new JLabel("Qualification:");


email.setFont(new Font("raleway", Font.BOLD, 20));
email.setBounds(100, 315, 200, 30);
add(email);

String educationValues[] = {"Non-Graduation", "Graduate", "Post-Graduation", "Doctrate",


"Others"};
education = new JComboBox(educationValues);
education.setBounds(300, 300, 400, 30);
education.setBackground(Color.white);
add(education);

JLabel marital = new JLabel("Occupation:");


marital.setFont(new Font("raleway", Font.BOLD, 20));
marital.setBounds(100, 370, 200, 30);
add(marital);
String occupationValues[] = {"Salaried", "Self-Employed", "Business", "Student",
"Retired", "Other"};
occupation = new JComboBox(occupationValues);
occupation.setBounds(300, 370, 400, 30);
occupation.setBackground(Color.white);
add(occupation);

JLabel address = new JLabel("PAN Number:");


address.setFont(new Font("raleway", Font.BOLD, 20));
address.setBounds(100, 420, 200, 30);
add(address);

pan = new JTextField();


pan.setFont(new Font("Raleway", Font.BOLD, 14));
pan.setBounds(300, 420, 400, 30);
add(pan);

JLabel city = new JLabel("Aadhar Number:");


city.setFont(new Font("raleway", Font.BOLD, 20));
city.setBounds(100, 470, 200, 30);
add(city);

aadhar = new JTextField();


aadhar.setFont(new Font("Raleway", Font.BOLD, 14));
aadhar.setBounds(300, 470, 400, 30);
add(aadhar);

JLabel state = new JLabel("Senior Citizen:");


state.setFont(new Font("raleway", Font.BOLD, 20));
state.setBounds(100, 520, 200, 30);
add(state);

syes = new JRadioButton("Yes");


syes.setBounds(300, 520, 100, 30);
syes.setBackground(Color.WHITE);
add(syes);

sno = new JRadioButton("No");


sno.setBounds(450, 520, 100, 30);
sno.setBackground(Color.WHITE);
add(sno);

ButtonGroup maritalgroup = new ButtonGroup();


maritalgroup.add(syes);
maritalgroup.add(sno);

JLabel pincode = new JLabel("Existing Account:");


pincode.setFont(new Font("raleway", Font.BOLD, 20));
pincode.setBounds(100, 570, 200, 30);
add(pincode);

eyes = new JRadioButton("Yes");


eyes.setBounds(300, 570, 100, 30);
eyes.setBackground(Color.WHITE);
add(eyes);

eno = new JRadioButton("No");


eno.setBounds(450, 570, 100, 30);
eno.setBackground(Color.WHITE);
add(eno);

ButtonGroup emaritalgroup = new ButtonGroup();


emaritalgroup.add(eyes);
emaritalgroup.add(eno);

next = new JButton("Next");


next.setBackground(Color.BLACK);
next.setForeground(Color.WHITE);
next.setFont(new Font("Raleway", Font.BOLD, 14));
next.setBounds(620, 640, 80, 25);
next.addActionListener(this);
add(next);

getContentPane().setBackground(Color.white);

setSize(850, 800);
setLocation(350, 10);
setVisible(true);
}

public void actionPerformed(ActionEvent ae) {


String sreligion = (String) religion.getSelectedItem();
String scategory = (String) category.getSelectedItem();
String sincome = (String) income.getSelectedItem();
String seducation = (String) education.getSelectedItem();
String soccupation = (String) occupation.getSelectedItem();
String sseniorcitizen = null;
if (syes.isSelected()) {
sseniorcitizen = "Yes";
} else if (sno.isSelected()) {
sseniorcitizen = "No";
}
String sexistingaccount = null;
if (eyes.isSelected()) {
sexistingaccount = "Yes";
} else if (eno.isSelected()) {
sexistingaccount = "No";
}

String span = pan.getText();


String saadhar = aadhar.getText();

try {
Conn c = new Conn();
String query = "insert into signuptwo values('" + formno + "', '" + sreligion + "', '" +
scategory + "', '" + sincome + "', '" + seducation + "', '" + soccupation + "', '" + span + "', '" +
saadhar + "', '" + sseniorcitizen + "', '" + sexistingaccount + "')";
c.s.executeUpdate(query);

//Signup3 object
setVisible(false);
new SignupThree(formno).setVisible(true);
} catch (Exception e) {
System.out.println(e);
}
}

public static void main(String args[]) {


new SignupTwo("");
}
}

SignUpThree.Java
package bank.management.system;

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

public class SignupThree extends JFrame implements ActionListener{

JRadioButton r1,r2,r3,r4;
JCheckBox c1,c2,c3,c4,c5,c6,c7;
JButton submit, cancel;
String formno;

SignupThree(String formno){
this.formno = formno;

setLayout(null);
JLabel l1 = new JLabel("Page 3: Account Details");
l1.setFont(new Font("Raleway", Font.BOLD,22));
l1.setBounds(280,40,400,40);
add(l1);

JLabel type = new JLabel("Account Type");


type.setFont(new Font("Raleway", Font.BOLD,20));
type.setBounds(100,100,200,30);
add(type);

r1 = new JRadioButton("Saving Account");


r1.setFont(new Font("Raleway",Font.BOLD,14));
r1.setBackground(Color.WHITE);
r1.setBounds(100,150,150,20);
add(r1);

r2 = new JRadioButton("Fixed Deposit Account");


r2.setFont(new Font("Raleway",Font.BOLD,14));
r2.setBackground(Color.WHITE);
r2.setBounds(350,150,250,20);
add(r2);

r3 = new JRadioButton("Current Account");


r3.setFont(new Font("Raleway",Font.BOLD,14));
r3.setBackground(Color.WHITE);
r3.setBounds(100,180,250,20);
add(r3);
r4 = new JRadioButton("Recurring Account");
r4.setFont(new Font("Raleway",Font.BOLD,14));
r4.setBackground(Color.WHITE);
r4.setBounds(350,180,250,20);
add(r4);

ButtonGroup groupaccount =new ButtonGroup();


groupaccount.add(r1);
groupaccount.add(r2);
groupaccount.add(r3);
groupaccount.add(r4);

JLabel card = new JLabel("Card Number");


card.setFont(new Font("Raleway", Font.BOLD,20));
card.setBounds(100,250,200,30);
add(card);

JLabel number = new JLabel("XXXX-XXXX-XXXX-4185");


number.setFont(new Font("Raleway", Font.BOLD,20));
number.setBounds(330,250,300,30);
add(number);

JLabel carddetail = new JLabel("Your 16 Digit Card Number");


carddetail.setFont(new Font("Raleway", Font.BOLD,12));
carddetail.setBounds(100,280,300,20);
add(carddetail);

JLabel pin = new JLabel("PIN");


pin.setFont(new Font("Raleway", Font.BOLD,20));
pin.setBounds(100,320,200,30);
add(pin);

JLabel pnumber = new JLabel("XXXX");


pnumber.setFont(new Font("Raleway", Font.BOLD,20));
pnumber.setBounds(330,320,300,30);
add(pnumber);

JLabel pindetail = new JLabel("Your 4 Digit Password");


pindetail.setFont(new Font("Raleway", Font.BOLD,12));
pindetail.setBounds(100,350,300,20);
add(pindetail);

JLabel services = new JLabel("Services Required");


services.setFont(new Font("Raleway", Font.BOLD,20));
services.setBounds(100,390,400,30);
add(services);

c1 = new JCheckBox ("ATM CARD");


c1.setBackground(Color.WHITE);
c1.setFont(new Font("Raleway", Font.BOLD, 14));
c1.setBounds(100,430,200,30);
add(c1);

c2 = new JCheckBox ("Internet Banking");


c2.setBackground(Color.WHITE);
c2.setFont(new Font("Raleway", Font.BOLD, 14));
c2.setBounds(350,430,200,30);
add(c2);
c3 = new JCheckBox ("Mobile Banking");
c3.setBackground(Color.WHITE);
c3.setFont(new Font("Raleway", Font.BOLD, 14));
c3.setBounds(100,460,200,30);
add(c3);

c4 = new JCheckBox ("Email & SMS Alerts");


c4.setBackground(Color.WHITE);
c4.setFont(new Font("Raleway", Font.BOLD, 14));
c4.setBounds(350,460,200,30);
add(c4);

c5 = new JCheckBox ("Cheque Book");


c5.setBackground(Color.WHITE);
c5.setFont(new Font("Raleway", Font.BOLD, 14));
c5.setBounds(100,490,200,30);
add(c5);

c6 = new JCheckBox ("E-Statement");


c6.setBackground(Color.WHITE);
c6.setFont(new Font("Raleway", Font.BOLD, 14));
c6.setBounds(350,490,200,30);
add(c6);

c7 = new JCheckBox ("I hereby declaires that the above entered details are correct to the
best of my knowledge.");
c7.setBackground(Color.WHITE);
c7.setFont(new Font("Raleway", Font.BOLD, 12));
c7.setBounds(100,550,600,30);
add(c7);

submit= new JButton("Submit");


submit.setBackground(Color.BLACK);
submit.setForeground(Color.WHITE);
submit.setFont(new Font("Raleway", Font. BOLD, 14));
submit.setBounds(250,620,100,30);
submit.addActionListener(this);
add (submit);

cancel= new JButton("Cancel");


cancel.setBackground(Color.BLACK);
cancel.setForeground(Color.WHITE);
cancel.setFont(new Font("Raleway", Font. BOLD, 14));
cancel.setBounds(420,620,100,30);
cancel.addActionListener(this);
add (cancel);

getContentPane().setBackground(Color.WHITE);

setSize(850,820);
setLocation(250,0);
setVisible(true);
}
public void actionPerformed(ActionEvent ae){
if (ae.getSource() == submit){
String accountType = null;
if(r1.isSelected()){
accountType ="Saving Account";
}else if (r2.isSelected()){
accountType ="Fixed Account";
}else if (r3.isSelected()){
accountType ="Current Account";
}else if (r4.isSelected()){
accountType="Recurring Deposit Account";
}
Random random = new Random();
String cardnumber = "" + Math.abs((random.nextLong()% 90000000L)
+5040936000000000L);

String pinnumber = "" + Math.abs((random.nextLong()% 9000L) + 1000L);

String facility = "";


if (c1.isSelected()){
facility = facility + " ATM Card";
}else if (c2.isSelected()) {
facility = facility + " Internet Bankimg";
}else if (c3.isSelected()){
facility = facility +" Mobile Banking";
}else if (c4.isSelected()){
facility = facility +" Email & SMS Alerts";
}else if (c5.isSelected()){
facility = facility +" Cheque Book";
}else if (c6.isSelected()){
facility = facility +" E-Statement";
}
try {
if (accountType.equals("")){
JOptionPane.showMessageDialog(null, "Account Type is Required");
}else {
Conn conn = new Conn();
String query1 = "insert into signupthree values('"+formno+"', '"+accountType+"',
'"+cardnumber+"', '"+pinnumber+"', '"+facility+"')";
String query2 = "insert into login values('"+formno+"', '"+cardnumber+"',
'"+pinnumber+"')";

conn.s.executeUpdate(query1);
conn.s.executeUpdate(query2);

JOptionPane.showMessageDialog(null,"Card Number: " + cardnumber + "\n Pin:" +


pinnumber);
setVisible(false);
new Deposit(pinnumber).setVisible(false);
}
}catch(Exception e){
System.out.println(e);
}

} else if(ae.getSource() == cancel){


setVisible(false);
new Login().setVisible(true);
}
}
public static void main(String args[]) {

new SignupThree(" ");


}
}

Transaction.Java

package bank.management.system;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Transactions extends JFrame implements ActionListener {

JButton deposit,withdrawl,ministatement,pinchange,fastcash, balanceenquiry,exit;


String pinnumber;
Transactions(String pinnumber){
this.pinnumber = pinnumber;

setLayout(null);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/atm.jpg"));
Image i2 = i1.getImage().getScaledInstance(900,800, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(0,0,900,800);
add(image);

JLabel text = new JLabel("Please Select Your Transaction");


text.setBounds(215,260,700,35);
text.setForeground(Color.WHITE);
text.setFont(new Font("System", Font.BOLD,16));
image.add(text);

deposit = new JButton("Deposit");


deposit.setBounds(170,370,150,20);
deposit.addActionListener(this);
image.add (deposit);

withdrawl = new JButton("Cash Withdrawl");


withdrawl.setBounds(355,370,150,20);
withdrawl.addActionListener(this);
image.add (withdrawl);

fastcash = new JButton("Fast Cash");


fastcash.setBounds(170,400,150,20);
fastcash.addActionListener(this);
image.add (fastcash);

ministatement = new JButton("Mini Statement");


ministatement.setBounds(355,400,150,20);
ministatement.addActionListener(this);
image.add (ministatement);

pinchange = new JButton("PIN Change");


pinchange.setBounds(170,430,150,20);
pinchange.addActionListener(this);
image.add (pinchange);

balanceenquiry = new JButton("Balance Enquiry");


balanceenquiry.setBounds(355,430,150,20);
balanceenquiry.addActionListener(this);
image.add (balanceenquiry);

exit = new JButton("Exit");


exit.setBounds(355,460,150,20);
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);
}else if (ae.getSource()== deposit){
setVisible(false);
new Deposit(pinnumber).setVisible(true);
}else if(ae.getSource() == withdrawl){
setVisible(false);
new Withdrawl(pinnumber).setVisible(true);
}else if (ae.getSource() == fastcash){
setVisible(false);
new FastCash(pinnumber).setVisible(true);
}else if (ae.getSource() == pinchange) {
setVisible(false);
new PinChange(pinnumber).setVisible(true);
}else if (ae.getSource() == balanceenquiry){
setVisible(false);
new BalanceEnquiry(pinnumber).setVisible(true);
}else if (ae.getSource() == ministatement) {
new MiniStatement(pinnumber).setVisible(true);
}

public static void main(String args[]) {


new Transactions("");
}
}

Deposit.Java

package bank.management.system;

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

public class Deposit extends JFrame implements ActionListener {


JTextField amount;
JButton deposit, back;
String pinnumber;
Deposit(String pinnumber){

this.pinnumber = pinnumber;
setLayout(null);

ImageIcon i1 = new ImageIcon (ClassLoader.getSystemResource("icons/atm.jpg"));


Image i2 = i1.getImage().getScaledInstance(900,800, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(0,0,900,800);
add(image);

JLabel text = new JLabel("Enter the amount you want to Deposit");


text.setForeground(Color.WHITE);
text.setFont(new Font("System", Font.BOLD,16));
text.setBounds(180,260,390,30);
image.add(text);

amount = new JTextField();


amount.setFont(new Font("Raleway", Font.BOLD, 22));
amount.setBounds(170,300,320,30);
image.add(amount);

deposit = new JButton("Deposit");


deposit.setBounds(355,410,150,30);
deposit.addActionListener(this);
image.add(deposit);
back = new JButton("Back");
back.setBounds(355,450,150,30);
back.addActionListener(this);
image.add(back);

setSize(900,900);
setLocation(300,0);
setVisible(true);
}

public void actionPerformed(ActionEvent ae){


if(ae.getSource() == deposit){
String number = amount.getText();
Date date = new Date();
if(number.equals("")){
JOptionPane.showMessageDialog(null, "Please enter the amount you want to
Deposit.");
}else{
try{
Conn conn = new Conn();
String query = " Insert into bank values('"+pinnumber+"', '"+date+"', 'Deposit',
'"+number+"')";
conn.s.executeUpdate(query);
JOptionPane.showMessageDialog(null, "Rs "+number+" Deposited Successfully");
setVisible(false);
new Transactions(pinnumber).setVisible(true);
}catch(Exception e){
System.out.println(e);
}
}
}else if (ae.getSource() == back){
setVisible(false);
new Transactions(pinnumber).setVisible(true);

}
}

public static void main(String args[]) {


new Deposit("");
}
}

Withdrawl.Java

package bank.management.system;

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

public class Withdrawl extends JFrame implements ActionListener {


JTextField amount;
JButton withdraw, back;
String pinnumber;
Withdrawl(String pinnumber){
this.pinnumber = pinnumber;
setLayout(null);

ImageIcon i1 = new ImageIcon (ClassLoader.getSystemResource("icons/atm.jpg"));


Image i2 = i1.getImage().getScaledInstance(900,800, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(0,0,900,800);
add(image);

JLabel text = new JLabel("Enter the amount you want to Withdraw");


text.setForeground(Color.WHITE);
text.setFont(new Font("System", Font.BOLD,16));
text.setBounds(180,260,390,30);
image.add(text);

amount = new JTextField();


amount.setFont(new Font("Raleway", Font.BOLD, 22));
amount.setBounds(175,300,320,30);
image.add(amount);

withdraw = new JButton("Withdraw");


withdraw.setBounds(355,410,150,30);
withdraw.addActionListener(this);
image.add(withdraw);

back = new JButton("Back");


back.setBounds(355,450,150,30);
back.addActionListener(this);
image.add(back);

setSize(900,900);
setLocation(300,0);
setVisible(true);
}

public void actionPerformed(ActionEvent ae){


if(ae.getSource() == withdraw){
String number = amount.getText();
Date date = new Date();
if(number.equals("")){
JOptionPane.showMessageDialog(null, "Please enter the amount you want to
Withdraw.");
}else{
try{
Conn conn = new Conn();
String query = " Insert into bank values('"+pinnumber+"', '"+date+"', 'Withdrawl',
'"+number+"')";
conn.s.executeUpdate(query);
JOptionPane.showMessageDialog(null, "Rs "+number+" Withdraw Successfully");
setVisible(false);
new Transactions(pinnumber).setVisible(true);
}catch(Exception e){
System.out.println(e);
}
}
}else if (ae.getSource() == back){
setVisible(false);
new Transactions(pinnumber).setVisible(true);

}
}

public static void main(String args[]) {


new Withdrawl("");
}
}

PinChange.Java
package bank.management.system;

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

public class PinChange extends JFrame implements ActionListener {


JPasswordField pin, repin;
JButton change, back;
String pinnumber;

PinChange(String pinnumber){
this.pinnumber = pinnumber;
setLayout(null);

ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/atm.jpg"));


Image i2 = i1.getImage().getScaledInstance(900,750, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(0,0,900,750);
add(image);

JLabel text = new JLabel("CHANGE YOUR PIN");


text.setForeground(Color.WHITE);
text.setFont(new Font("System", Font.BOLD, 16));
text.setBounds(250,240,500,20);
image.add(text);

JLabel pintext = new JLabel("New PIN:");


pintext.setForeground(Color.WHITE);
pintext.setFont(new Font("System", Font.BOLD, 14));
pintext.setBounds(165,275,100,20);
image.add(pintext);

pin = new JPasswordField();


pin.setFont(new Font ("Raleway", Font.BOLD,25));
pin.setBounds(330,270,170,22);
image.add(pin);

JLabel repintext = new JLabel("Re-Enter New PIN:");


repintext.setForeground(Color.WHITE);
repintext.setFont(new Font("System", Font.BOLD, 14));
repintext.setBounds(165,310,180,20);
image.add(repintext);

repin = new JPasswordField();


repin.setFont(new Font ("Raleway", Font.BOLD,25));
repin.setBounds(330,305,170,22);
image.add(repin);

change = new JButton("CHANGE");


change.setBounds(355,380,150,30);
change.addActionListener(this);
image.add(change);

back = new JButton("BACK");


back.setBounds(355,420,150,30);
back.addActionListener(this);
image.add(back);

setSize(900,900);
setLocation(300,0);
setUndecorated(true);
setVisible(true);
}

public void actionPerformed(ActionEvent ae){


if (ae.getSource() == change){
try{
String npin = pin.getText();
String rpin = repin.getText();

if (!npin.equals(rpin)) {
JOptionPane.showMessageDialog(null, "Entered PIN does not match");
return;
}

if(npin.equals("")){
JOptionPane.showMessageDialog(null, "Please enter new PIN");
return;
}

if(rpin.equals("")){
JOptionPane.showMessageDialog(null, "Please re-enter new PIN");
return;
}

Conn conn = new Conn();


String query1 = "update bank set pin = '"+rpin+"' where pin='"+pinnumber+"'";
String query2 = "update login set pin = '"+rpin+"' where pin='"+pinnumber+"'";
String query3 = "update signupthree set pin = '"+rpin+"' where pin='"+pinnumber+"'";

conn.s.executeUpdate(query1);
conn.s.executeUpdate(query2);
conn.s.executeUpdate(query3);
JOptionPane.showMessageDialog(null, "PIN changed successfully");
setVisible(false);
new Transactions(rpin).setVisible(true);

} catch(Exception e){
System.out.println(e);
}
}else {
setVisible(false);
new Transactions(pinnumber).setVisible(true);
}
}
public static void main(String args[]) {
new PinChange("").setVisible(true);
}
}

FastCash.Java
package bank.management.system;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import java.util.Date;
public class FastCash extends JFrame implements ActionListener {

JButton deposit,withdrawl,ministatement,pinchange,fastcash, balanceenquiry,exit;


String pinnumber;
FastCash(String pinnumber){
this.pinnumber = pinnumber;

setLayout(null);
ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/atm.jpg"));
Image i2 = i1.getImage().getScaledInstance(900,800, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(0,0,900,800);
add(image);

JLabel text = new JLabel("Select Withdrawl Amount");


text.setBounds(240,260,700,35);
text.setForeground(Color.WHITE);
text.setFont(new Font("System", Font.BOLD,16));
image.add(text);

deposit = new JButton("Rs 100");


deposit.setBounds(170,370,150,20);
deposit.addActionListener(this);
image.add (deposit);

withdrawl = new JButton("Rs 500");


withdrawl.setBounds(355,370,150,20);
withdrawl.addActionListener(this);
image.add (withdrawl);

fastcash = new JButton("Rs 1000");


fastcash.setBounds(170,400,150,20);
fastcash.addActionListener(this);
image.add (fastcash);

ministatement = new JButton("Rs 2000");


ministatement.setBounds(355,400,150,20);
ministatement.addActionListener(this);
image.add (ministatement);

pinchange = new JButton("Rs 5000");


pinchange.setBounds(170,430,150,20);
pinchange.addActionListener(this);
image.add (pinchange);

balanceenquiry = new JButton("Rs 10000");


balanceenquiry.setBounds(355,430,150,20);
balanceenquiry.addActionListener(this);
image.add (balanceenquiry);

exit = new JButton("Back");


exit.setBounds(355,460,150,20);
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){
setVisible(false);
new Transactions(pinnumber).setVisible(true);
}else {
String amount = ((JButton)ae.getSource()).getText().substring(3); // Rs 500
Conn c = new Conn();
try{
ResultSet rs = c.s.executeQuery("select * from bank where pin = '"+pinnumber+"'");
int balance = 0;
while(rs.next()) {
if (rs.getString("type").equals("Deposit")){
balance += Integer.parseInt(rs.getString("amount"));
}else{
balance -= Integer.parseInt(rs.getString("amount"));
}
}

if(ae.getSource() != exit && balance < Integer.parseInt(amount)){


JOptionPane.showMessageDialog(null, "Insufficient Balance");
return;
}
Date date = new Date();
String query = "Insert into bank values('"+pinnumber+"', '"+date+"' , 'Withdrawl',
'"+amount+"')";
c.s.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Rs " + amount + " Debited Successfully");

setVisible(false);
new Transactions(pinnumber).setVisible(true);
}catch (Exception e){
System.out.println(e);
}
}

public static void main(String args[]) {


new FastCash(" ");
}
}

BalanceEnquiry.Java
package bank.management.system;

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

public class BalanceEnquiry extends JFrame implements ActionListener{


JButton back;
String pinnumber;

BalanceEnquiry(String pinnumber){
this.pinnumber = pinnumber;
setLayout(null);

ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/atm.jpg"));


Image i2 = i1.getImage().getScaledInstance(900,750, Image.SCALE_DEFAULT);
ImageIcon i3 = new ImageIcon(i2);
JLabel image = new JLabel(i3);
image.setBounds(0,0,900,750);
add(image);

back = new JButton("Back");


back.setBounds(355,420,150,30);
back.addActionListener(this);
image.add(back);

Conn c = new Conn();


int balance = 0;
try{
ResultSet rs = c.s.executeQuery("select * from bank where pin = '"+pinnumber+"'");
while(rs.next()) {
if (rs.getString("type").equals("Deposit")){
balance += Integer.parseInt(rs.getString("amount"));
}else{
balance -= Integer.parseInt(rs.getString("amount"));
}
}
}catch (Exception e){
System.out.println(e);
}

JLabel text = new JLabel("Your Current Account Balance is Rs "+ balance);


text.setForeground(Color.WHITE);
text.setBounds(170,250,400,30);
image.add(text);

setSize(900,900);
setLocation(300,0);
setUndecorated(true);
setVisible(true);

public void actionPerformed(ActionEvent ae) {


setVisible(false);
new Transactions(pinnumber).setVisible(true);
}

public static void main(String args[]) {


new BalanceEnquiry("");

}
}
MiniStatement.Java

package bank.management.system;

import java.awt.Color;
import javax.swing.*;
import java.sql.*;

public class MiniStatement extends JFrame {

MiniStatement(String pinnumber){
setTitle("Mini Statement");

setLayout(null);

JLabel mini = new JLabel();


add(mini);

JLabel bank = new JLabel("Canara Bank");


bank.setBounds(150,20,100,25);
add(bank);

JLabel card = new JLabel("");


card.setBounds(20,80,300,20);
add(card);
JLabel balance = new JLabel();
balance.setBounds(20,400,300,20);
add(balance);

try{
Conn conn = new Conn();
ResultSet rs = conn.s.executeQuery("Select * from login where pin = '"+pinnumber+"'");
while(rs.next()) {
card.setText("Card Number: " + rs.getString("cardnumber").substring(0, 4) +
"XXXXXXXX" + rs.getString("cardnumber").substring(12));
}
}catch(Exception e){
System.out.println(e);
}

try{
Conn conn = new Conn();
int bal = 0;
ResultSet rs = conn.s.executeQuery("Select * from bank where pin = '"+pinnumber+"'");
while(rs.next()) {
mini.setText(mini.getText() + "<html>" + rs.getString("date") +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + rs.getString("type") +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
rs.getString("amount") + "<br><br><html>");
if (rs.getString("type").equals("Deposit")){
bal += Integer.parseInt(rs.getString("amount"));
}else{
bal -= Integer.parseInt(rs.getString("amount"));
}
}
balance.setText("Your current account balance is Rs " + bal );
}catch(Exception e){
System.out.println(e);
}
mini.setBounds(20,140,400,200);
setSize(400,600);
setLocation(20,20);
getContentPane().setBackground(Color.WHITE);
setVisible(true);
}

public static void main(String args[]) {


new MiniStatement("");
}
}

Screenshots
Login Page
SignUpOne Page

SignUpTwo Page
SignUpThree Page

Transaction Page
Deposit Page

Withdrawl Page
FastCash Page

PinChange Page
BalanceEnquiry Page

You might also like