Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
86 views45 pages

Engineering Students' Banking Project

The system allows users to create bank accounts, view account details, make transactions like deposits and withdrawals. Admin can view details of all customers and accounts. The system will be developed using Java, JSP, HTML, CSS and connected to a MySQL database.

Uploaded by

invisibledark253
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views45 pages

Engineering Students' Banking Project

The system allows users to create bank accounts, view account details, make transactions like deposits and withdrawals. Admin can view details of all customers and accounts. The system will be developed using Java, JSP, HTML, CSS and connected to a MySQL database.

Uploaded by

invisibledark253
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

ONLINE BANKING SYSTEM

A MINI PROJECT REPORT

Submitted by

AKASH.R (20P301)
HARISH.S (20P316)
SHINAS.H (20P345)
SAKTHIVEL.S (21P705)

In partial fulfillment for the award of the degree of

BACHELOR OF ENGINEERING

in
COMPUTER SCIENCE AND ENGINEERING

ANNA UNIVERSITY, CHENNAI 600 025

APRIL 2023
KARPAGAM COLLEGE OF ENGINERING
(Autonomous)
COIMBATORE – 641 032

ONLINE BANKING SYSTEM

Bonafide record of the work done by


AKASH.R (20P301)
HARISH.S (20P316)
SHINAS.H (20P345)
SAKTHIVEL.S (21P705)

Dissertation submitted in partial fulfillment of the requirement for the degree of

BACHELOR OF ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

of Anna University, Chennai

APRIL 2023

Dr. N. RATHINA KUMAR, ASP/CSE Dr. T. RAVICHANDRAN, M.E., Ph.D.


Faculty Guide Head of the Department

Certified that the candidate was examined in the viva-voce examination held
on ………………….

……………………..
(Internal Examiner)
ACKNOWLEDGEMENT

We express our sincere thanks to Karpagam educational and charitable trust for
providing necessary facilities to bring out the project successfully. We felt greatness
to record our thanks to the chairman Dr. R.VASANTHAKUMAR, B.E.,(Hons),
D.Sc. for all his support and ray of strengthening hope extended.

It is the moment of immense pride for us to reveal our profound thanks to our
respected Principal, Dr. P. KARTHIGAIKUMAR, M.E., Ph.D. who happens to be
striving force in all our endeavors.

We express our sincere thanks to our Dr. T. RAVICHANDRAN, M.E., PhD. Head
of the Department of Computer Science and Engineering for providing an
opportunity to work on this project. His valuable suggestions helped us a lot to do
this project.

A word of thanks would not be sufficient for the work of our project guide
Dr. N. RATHINA KUMAR, ASP/CSE, Department of Computer Science and
Engineering whose efforts and inspiration lead us through every trying circumstance.

We would also like to recollect the courage and enthusiasm that was inculcated in us
by our mini project coordinator, Ms. SUBHASHREE K, M.E. Department of
Computer Science and Engineering for valuable guidance and support through the
tenure of our project.

We deeply express our gratitude to all the members of the faculty of the Department
of Computer Science and Engineering for the encouragement, which we received
throughout the semester.
TABLE OF CONTENTS

CHAPTER
TITLE PAGE NO.
NO.
ABSTRACT 1
LIST OF FIGURES 2
LIST OF ABBREVIATIONS 3
1. INTRODUCTION 4
1.1 DEFINITION 4
1.2 OBJECTIVE 4
2. SYSTEM OVERVIEW 5
2.1 EXISTING SYSTEM 5
2.2 PROPOSED SYSTEM 5
3. REQUIREMENTS 6
3.1 DEVELOPER REQUIREMENTS 6
3.2 USER REQUIREMENTS 6
4. SYSTEM DESIGN 7
4.1 SYSTEM ARCHITECTURE DESIGN 7
4.2 SCHEMA DIAGRAM 8
4.3 ER DIAGRAM 9
5. SYSTEM ANALYSIS 10
5.1 MODULES 10
5.1.1 CUSTOMER 10
5.1.2 ACCOUNT 11
5.1.3 TRANSACTION 11
6. IMPLEMENTATION 12
7. SCREENSHOTS 37
8. CONCLUSION 41
9. REFERENCES 32
ABSTRACT

With the rapid globalization of the Indian economy, enterprises are


facing with ever changing competitive environment. Enterprises are adopting
strategies aimed at developing competitive advantage based on enhanced
customer value in terms of product differentiation, quality, speed, service and
costs. In the post liberalization era, with the deregulation of Indian economy,
the financial service sector witnessing a complete metamorphosis and
technology is playing a very significant role in this record.
Over the last decade India has been one of the fastest adopters of
information technology, particularly because of its capability to provide
software solution to organizations around the world. This capability has
provided a tremendous impetuous to the domestic banking industry in India to
deploy the latest in technology, particularly in the Internet banking and e-
commerce arenas. Banks are growing in size by mergers and acquisitions,
which have been driven by communication and technology. Technology is
playing a major role in increasing the efficiency, courtesy and speed of
customer service. It is said to be the age of E- banking.

An Online Banking user is expected to perform at least one of the


following transactions online:

1. Create New Account


2. Withdraw Amount
3. Deposit Amount
4. Delete Account
5. View All Customers Details

1
LIST OF FIGURES

Fig No. Name Page No.


SYSTEM ARCHITECTURE
4.1 7
DESIGN
4.2 SCHEMA DIAGRAM 8
4.3 ER DIAGRAM 9
7.1 CREATE NEW ACCOUNT 37
7.2 SEARCH CUSTOMER 37
7.3 VIEW ALL ACCOUNT HOLDER 38
7.4 DELETE ACCOUNT HOLDER 38
7.5 BACKGROUND COLOR 39
7.6 PRINT 39
7.7 PRINT DETAILS 40
7.8 ABOUT BANKSYSTEM 40

2
LIST OF ABBREVIATIONS

SQL Structured Query Language


OS Operating System

3
CHAPTER 1

INTRODUCTION

1.1 DEFINITION

Bank’s main purpose behind the online banking system is to secure the
customers money and to gain their trust. While keeping customer money safe
they also charge some amount of rate of interest on the deposited money. We
have implemented most of the feature of online banking in it. User can create
an account, do withdrawal, request a Deposit amount, check his/her current
balance, and view reports of all the transaction.

1.2 OBJECTIVE

The main objective of the Online Banking System is to manage the


details of Accounts, Internet Banking, Balance, Statement. It manages all the
information about Accounts, Customer, Statement, Accounts. The project is
totally built at administrative end and thus only the administrator is guaranteed
the access.

4
CHAPTER 2

SYSTEM OVERVIEW

2.1 EXISTING SYSTEM

The branch availability is poor in Rural areas. They don’t cater to small
clients and there is a correct feeling that these Private commercial Banks are
only for the Rich & elite. The cost of servicing a customer in a private bank is
quite high. They even charge the SMS on a monthly basis from every customer.
These banks do not bother to follow any Government Schemes.

2.2 PROPOSED SYSTEM

The ability to bank wherever and however you want is one of the main
benefits of mobile and online banking solutions. Our smartphones and
computers are typically readily available, allowing 24/7 account access to take
care of any number of banking tasks quickly. Digital banking also offers
longer-tail conveniences, such as the ability to go cashless. Digital banking
offers a host of important benefits for consumers that can make their lives
easier and make them better stewards of their money.

5
CHAPTER 3

REQUIREMENTS

3.1 DEVELOPER REQUIREMENTS

As this system is an online Web-based application so a client server will


be the most suitable Organizational style for this system.

Hardware Used Software Used

 Intel Dual Core Processor.  Eclipse


 160 GB Hard Disk Drive.  Browser (IE 7.0 or Above, Mozilla
 1GB RAM. Firefox, Google Chrome, Opera)
 O.S. – Windows XP SP2.

3.2 USER REQUIREMENTS

The following is the requirements for the system users including


members and administrators.

Hardware Requirements Software Requirements

 Intel Pentium 4 Processor.  Browser (IE 7.0 or Above, Mozilla


 20 GB Hard Disk Drive. Firefox, Google Chrome, Opera)
 256MB RAM.
 O.S. – Windows XP.

6
CHAPTER 4
SYSTEM DESIGN

4.1 SYSTEM ARCHITECTURE DESIGN

Fig. 4.1. Overall working of the system

7
4.2 SCHEMA DIAGRAM

Fig.4.2. Schema Diagram

8
4.3 ER DIAGRAM

Fig. 4.3. ER Diagram

9
CHAPTER 5

SYSTEM ANALYSIS

5.1 MODULE

The system after careful analysis has been identified to be presented with
the following modules and roles. The modules involved are:
 Customer
 Account
 Transaction

5.1.1 CUSTOMER

The main aim for developing this module is provide all the functionality
related to customer. It tracks all the information and details of the customer.
We have developed all type of CRUD (Create, Read, Update and Delete)
operations of the customer.

 Admin can add new customer


 Admin can see the list of customer details
 Only admin can edit and update the record of the customer
 Admin will be able to delete the records of the customer
 Customer will be able to see his details
 Customer will be able to update his details

10
5.1.2 ACCOUNT

The main objective for developing this module is to manage the account
type. So all account company will be managed by admin and customer will be
able to see the account type.

 Admin can manage the account


 Admin can edit/delete the account
 Admin can see the list of all account
 Customer can see account

5.1.3 TRANSACTION

The main aim for developing this module is to manage the transaction
data wise. All transactions will be managed by admin and vendor will be able
to see transaction. Admin can see the list of all the transaction and filter it
according to the vendors.

 Admin can manage the transaction


 Admin can edit/delete the transaction
 Admin can see the list of all transaction
 Vendor can see transaction

11
CHAPTER 6

IMPLEMENTATION

6.1 SOURCE CODE

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import java.text.*;
import java.io.*;
import java.awt.PrintJob.*;
import javax.swing.plaf.metal.*;

public class BankSystem extends JFrame implements ActionListener, ItemListener {

//Main Place on Form where All Child Forms will Shown.


private JDesktopPane desktop = new JDesktopPane ();

//For Program's MenuBar.


private JMenuBar bar;

//All the Main Menu of the Program.


private JMenu mnuFile, mnuEdit, mnuView, mnuOpt, mnuWin, mnuHelp;
private JMenuItem addNew, printRec, end; //File Menu
Options.
private JMenuItem deposit, withdraw, delRec, search, searchName; //Edit
Menu Options.

12
private JMenuItem oneByOne, allCustomer; //View Menu
Options.
private JMenuItem change, style, theme; //Option
Menu Options.
private JMenuItem close, closeAll; //Window
Menu Options.
private JMenuItem content, keyHelp, about; //Help Menu
Options.

//PopupMenu of Program.
private JPopupMenu popMenu = new JPopupMenu ();

//MenuItems for PopupMenu of the Program.


private JMenuItem open, report, dep, with, del, find, all;

//For Program's ToolBar.


private JToolBar toolBar;

//For ToolBar's Button.


private JButton btnNew, btnDep, btnWith, btnRec, btnDel, btnSrch, btnHelp,
btnKey;

//Main Form StatusBar where Program's Name & Welcome Message Display.
private JPanel statusBar = new JPanel ();

//Labels for Displaying Program's Name & saying Welcome to Current User on
StatusBar.
private JLabel welcome;
private JLabel author;

//Making the LookAndFeel Menu.


private String strings[] = {"1. Metal", "2. Motif", "3. Windows"};
private UIManager.LookAndFeelInfo looks[] =
UIManager.getInstalledLookAndFeels ();

13
private ButtonGroup group = new ButtonGroup ();
private JRadioButtonMenuItem radio[] = new
JRadioButtonMenuItem[strings.length];

//Getting the Current System Date.


private java.util.Date currDate = new java.util.Date ();
private SimpleDateFormat sdf = new SimpleDateFormat ("dd MMMM yyyy",
Locale.getDefault());
private String d = sdf.format (currDate);

//Following all Variables are use in BankSystem's IO's.

//Variable use in Reading the BankSystem Records File & Store it in an Array.
private int count = 0;
private int rows = 0;
private int total = 0;

//String Type Array use to Load Records From File.


private String records[][] = new String [500][6];

//Variable for Reading the BankSystem Records File.


private FileInputStream fis;
private DataInputStream dis;

//Constructor of The Bank Program to Iniatilize all Variables of Program.

public BankSystem () {

//Setting Program's Title.


super ("Blasters Bank [Pvt] Limited.");

UIManager.addPropertyChangeListener (new UISwitchListener


((JComponent)getRootPane()));

14
//Creating the MenuBar.
bar = new JMenuBar ();

//Setting the Main Window of Program.


setIconImage (getToolkit().getImage ("Images/Bank.gif"));
setSize (700, 550);
setJMenuBar (bar);

//Closing Code of Main Window.


addWindowListener (new WindowAdapter () {
public void windowClosing (WindowEvent we) {
quitApp ();
}
}
);

//Setting the Location of Application on Screen.


setLocation((Toolkit.getDefaultToolkit().getScreenSize().width -
getWidth()) / 2,
(Toolkit.getDefaultToolkit().getScreenSize().height - getHeight()) /
2);

//Creating the MenuBar Items.


mnuFile = new JMenu ("File");
mnuFile.setMnemonic ((int)'F');
mnuEdit = new JMenu ("Edit");
mnuEdit.setMnemonic ((int)'E');
mnuView = new JMenu ("View");
mnuView.setMnemonic ((int)'V');
mnuOpt = new JMenu ("Options");
mnuOpt.setMnemonic ((int)'O');
mnuWin = new JMenu ("Window");
mnuWin.setMnemonic ((int)'W');
mnuHelp = new JMenu ("Help");

15
mnuHelp.setMnemonic ((int)'H');

//Creating the MenuItems of Program.


//MenuItems for FileMenu.
addNew = new JMenuItem ("Open New Account", new ImageIcon
("Images/Open.gif"));
addNew.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_N,
Event.CTRL_MASK));
addNew.setMnemonic ((int)'N');
addNew.addActionListener (this);
printRec = new JMenuItem ("Print Customer Balance", new ImageIcon
("Images/New.gif"));
printRec.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_R,
Event.CTRL_MASK));
printRec.setMnemonic ((int)'R');
printRec.addActionListener (this);
end = new JMenuItem ("Quit BankSystem ?", new ImageIcon
("Images/export.gif"));
end.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_Q,
Event.CTRL_MASK));
end.setMnemonic ((int)'Q');
end.addActionListener (this);

//MenuItems for EditMenu.


deposit = new JMenuItem ("Deposit Money");
deposit.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_T,
Event.CTRL_MASK));
deposit.setMnemonic ((int)'T');
deposit.addActionListener (this);
withdraw = new JMenuItem ("Withdraw Money");
withdraw.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_W,
Event.CTRL_MASK));
withdraw.setMnemonic ((int)'W');
withdraw.addActionListener (this);

16
delRec = new JMenuItem ("Delete Customer", new ImageIcon
("Images/Delete.gif"));
delRec.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_D,
Event.CTRL_MASK));
delRec.setMnemonic ((int)'D');
delRec.addActionListener (this);
search = new JMenuItem ("Search By No.", new ImageIcon
("Images/find.gif"));
search.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_S,
Event.CTRL_MASK));
search.setMnemonic ((int)'S');
search.addActionListener (this);
searchName = new JMenuItem ("Search By Name");
searchName.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_M,
Event.CTRL_MASK));
searchName.setMnemonic ((int)'M');
searchName.addActionListener (this);

//MenuItems for ViewMenu.


oneByOne = new JMenuItem ("View One By One");
oneByOne.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_O,
Event.CTRL_MASK));
oneByOne.setMnemonic ((int)'O');
oneByOne.addActionListener (this);
allCustomer = new JMenuItem ("View All Customer", new ImageIcon
("Images/refresh.gif"));
allCustomer.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_A,
Event.CTRL_MASK));
allCustomer.setMnemonic ((int)'A');
allCustomer.addActionListener (this);

//MenuItems for OptionMenu.


change = new JMenuItem ("Change Background Color");

17
change.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_B,
Event.CTRL_MASK));
change.setMnemonic ((int)'B');
change.addActionListener (this);
//Menu For Changing the Program's Layout.
style = new JMenu ("Change Layout Style");
style.setMnemonic ((int)'L');
for( int i = 0; i < radio.length ; i++ ) { //Creating the
subMenus of Style Menu.
radio[i] = new JRadioButtonMenuItem (strings[i]); //Build an
Array of Layouts to Apply.
radio[i].addItemListener (this); //Setting their
Actions.
group.add (radio[i]); //Making them
Grouped.
style.add (radio[i]); //Adding to
Style MenuOption.
}
//SubMenu of Theme For Applying different Themes to Program By
Building an Array of Themes to Apply.
MetalTheme[] themes = { new DefaultMetalTheme(), new GreenTheme(),
new AquaTheme(),
new SandTheme(), new SolidTheme(), new
MilkyTheme(), new GrayTheme() };
theme = new MetalThemeMenu ("Apply Theme", themes); //Putting
the Themes in ThemeMenu.
theme.setMnemonic ((int)'M');

//MenuItems for WindowMenu.


close = new JMenuItem ("Close Active Window");
close.setMnemonic ((int)'C');
close.addActionListener (this);
closeAll = new JMenuItem ("Close All Windows...");
closeAll.setMnemonic ((int)'A');

18
closeAll.addActionListener (this);

//MenuItems for HelpMenu.


content = new JMenuItem ("Help Contents", new ImageIcon
("Images/paste.gif"));
content.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_H,
Event.CTRL_MASK));
content.setMnemonic ((int)'H');
content.addActionListener (this);
keyHelp = new JMenuItem ("Help on Shortcuts...");
keyHelp.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_K,
Event.CTRL_MASK));
keyHelp.setMnemonic ((int)'K');
keyHelp.addActionListener (this);
about = new JMenuItem ("About BankSystem", new ImageIcon
("Images/Save.gif"));
about.setAccelerator (KeyStroke.getKeyStroke(KeyEvent.VK_C,
Event.CTRL_MASK));
about.setMnemonic ((int)'C');
about.addActionListener (this);

//Adding MenuItems to Menu.

//File Menu Items.


mnuFile.add (addNew);
mnuFile.addSeparator ();
mnuFile.add (printRec);
mnuFile.addSeparator ();
mnuFile.add (end);

//Edit Menu Items.


mnuEdit.add (deposit);
mnuEdit.add (withdraw);
mnuEdit.addSeparator ();

19
mnuEdit.add (delRec);
mnuEdit.addSeparator ();
mnuEdit.add (search);
mnuEdit.add (searchName);

//View Menu Items.


mnuView.add (oneByOne);
mnuView.addSeparator ();
mnuView.add (allCustomer);

//Options Menu Items.


mnuOpt.add (change);
mnuOpt.addSeparator ();
mnuOpt.add (style);
mnuOpt.addSeparator ();
mnuOpt.add (theme);

//Window Menu Items.


mnuWin.add (close);
mnuWin.add (closeAll);

//Help Menu Items.


mnuHelp.add (content);
mnuHelp.addSeparator ();
mnuHelp.add (keyHelp);
mnuHelp.addSeparator ();
mnuHelp.add (about);

//Adding Menues to Bar.


bar.add (mnuFile);
bar.add (mnuEdit);
bar.add (mnuView);
bar.add (mnuOpt);
bar.add (mnuWin);

20
bar.add (mnuHelp);

//MenuItems for PopupMenu.


open = new JMenuItem ("Open New Account", new ImageIcon
("Images/Open.gif"));
open.addActionListener (this);
report = new JMenuItem ("Print BankSystem Report", new ImageIcon
("Images/New.gif"));
report.addActionListener (this);
dep = new JMenuItem ("Deposit Money");
dep.addActionListener (this);
with = new JMenuItem ("Withdraw Money");
with.addActionListener (this);
del = new JMenuItem ("Delete Customer", new ImageIcon
("Images/Delete.gif"));
del.addActionListener (this);
find = new JMenuItem ("Search Customer", new ImageIcon
("Images/find.gif"));
find.addActionListener (this);
all = new JMenuItem ("View All Customer", new ImageIcon
("Images/refresh.gif"));
all.addActionListener (this);

//Adding Menues to PopupMenu.


popMenu.add (open);
popMenu.add (report);
popMenu.add (dep);
popMenu.add (with);
popMenu.add (del);
popMenu.add (find);
popMenu.add (all);

//Following Procedure display the PopupMenu of Program.


addMouseListener (new MouseAdapter () {

21
public void mousePressed (MouseEvent me) { checkMouseTrigger
(me); }
public void mouseReleased (MouseEvent me) { checkMouseTrigger
(me); }
private void checkMouseTrigger (MouseEvent me) {
if (me.isPopupTrigger ())
popMenu.show (me.getComponent (), me.getX (),
me.getY ());
}
}
);

//Creating the ToolBar's Buttons of Program.


btnNew = new JButton (new ImageIcon ("Images/NotePad.gif"));
btnNew.setToolTipText ("Create New Account");
btnNew.addActionListener (this);
btnDep = new JButton (new ImageIcon ("Images/ImationDisk.gif"));
btnDep.setToolTipText ("Deposit Money");
btnDep.addActionListener (this);
btnWith = new JButton (new ImageIcon ("Images/SuperDisk.gif"));
btnWith.setToolTipText ("Withdraw Money");
btnWith.addActionListener (this);
btnRec = new JButton (new ImageIcon ("Images/Paproll.gif"));
btnRec.setToolTipText ("Print Customer Balance");
btnRec.addActionListener (this);
btnDel = new JButton (new ImageIcon ("Images/Toaster.gif"));
btnDel.setToolTipText ("Delete Customer");
btnDel.addActionListener (this);
btnSrch = new JButton (new ImageIcon ("Images/Search.gif"));
btnSrch.setToolTipText ("Search Customer");
btnSrch.addActionListener (this);
btnHelp = new JButton (new ImageIcon ("Images/Help.gif"));
btnHelp.setToolTipText ("Help on Bank System");
btnHelp.addActionListener (this);

22
btnKey = new JButton (new ImageIcon ("Images/Keys.gif"));
btnKey.setToolTipText ("Shortcut Keys of BankSystem");
btnKey.addActionListener (this);

//Creating the ToolBar of Program.


toolBar = new JToolBar ();
toolBar.add (btnNew);
toolBar.addSeparator ();
toolBar.add (btnDep);
toolBar.add (btnWith);
toolBar.addSeparator ();
toolBar.add (btnRec);
toolBar.addSeparator ();
toolBar.add (btnDel);
toolBar.addSeparator ();
toolBar.add (btnSrch);
toolBar.addSeparator ();
toolBar.add (btnHelp);
toolBar.add (btnKey);

//Creating the StatusBar of Program.


author = new JLabel (" " + "Blasters Bank [Pvt] Limited.", Label.LEFT);
author.setForeground (Color.black);
author.setToolTipText ("Program's Title");
welcome = new JLabel ("Welcome Today is " + d + " ", JLabel.RIGHT);
welcome.setForeground (Color.black);
welcome.setToolTipText ("Welcoming the User & System Current Date");
statusBar.setLayout (new BorderLayout());
statusBar.add (author, BorderLayout.WEST);
statusBar.add (welcome, BorderLayout.EAST);

//For Making the Dragging Speed of Internal Frames Faster.


desktop.putClientProperty ("JDesktopPane.dragMode", "outline");

23
//Setting the Contents of Programs.
getContentPane().add (toolBar, BorderLayout.NORTH);
getContentPane().add (desktop, BorderLayout.CENTER);
getContentPane().add (statusBar, BorderLayout.SOUTH);

//Showing The Main Form of Application.


setVisible (true);

//Function For Performing different Actions By Menus of Program.

public void actionPerformed (ActionEvent ae) {

Object obj = ae.getSource();

if (obj == addNew || obj == open || obj == btnNew) {

boolean b = openChildWindow ("Create New Account");


if (b == false) {
NewAccount newAcc = new NewAccount ();
desktop.add (newAcc);
newAcc.show ();
}

}
else if (obj == printRec || obj == btnRec || obj == report) {

getAccountNo ();

}
else if (obj == end) {

quitApp ();

24
}
else if (obj == deposit || obj == dep || obj == btnDep) {

boolean b = openChildWindow ("Deposit Money");


if (b == false) {
DepositMoney depMon = new DepositMoney ();
desktop.add (depMon);
depMon.show ();
}

}
else if (obj == withdraw || obj == with || obj == btnWith) {

boolean b = openChildWindow ("Withdraw Money");


if (b == false) {
WithdrawMoney withMon = new WithdrawMoney ();
desktop.add (withMon);
withMon.show ();
}

}
else if (obj == delRec || obj == del || obj == btnDel) {

boolean b = openChildWindow ("Delete Account Holder");


if (b == false) {
DeleteCustomer delCus = new DeleteCustomer ();
desktop.add (delCus);
delCus.show ();
}

}
else if (obj == search || obj == find || obj == btnSrch) {

25
boolean b = openChildWindow ("Search Customer [By No.]");
if (b == false) {
FindAccount fndAcc = new FindAccount ();
desktop.add (fndAcc);
fndAcc.show ();
}

}
else if (obj == searchName) {

boolean b = openChildWindow ("Search Customer [By Name]");


if (b == false) {
FindName fndNm = new FindName ();
desktop.add (fndNm);
fndNm.show ();
}

}
else if (obj == oneByOne) {

boolean b = openChildWindow ("View Account Holders");


if (b == false) {
ViewOne vwOne = new ViewOne ();
desktop.add (vwOne);
vwOne.show ();
}

}
else if (obj == allCustomer || obj == all) {

boolean b = openChildWindow ("View All Account Holders");


if (b == false) {
ViewCustomer viewCus = new ViewCustomer ();
desktop.add (viewCus);

26
viewCus.show ();
}

}
else if (obj == change) {

Color cl = new Color (153, 153, 204);


cl = JColorChooser.showDialog (this, "Choose Background Color",
cl);
if (cl == null) { }
else {
desktop.setBackground (cl);
desktop.repaint ();
}

}
else if (obj == close) {

try {
desktop.getSelectedFrame().setClosed(true);
}
catch (Exception CloseExc) { }

}
else if (obj == closeAll) {

JInternalFrame Frames[] = desktop.getAllFrames (); //Getting all


Open Frames.
for(int getFrameLoop = 0; getFrameLoop < Frames.length;
getFrameLoop++) {
try {
Frames[getFrameLoop].setClosed (true); //Close the
frame.
}

27
catch (Exception CloseExc) { } //if we can't close it
then we have a problem.
}

}
else if (obj == content || obj == btnHelp) {

boolean b = openChildWindow ("BankSystem Help");


if (b == false) {
BankHelp hlpBank = new BankHelp ("BankSystem Help",
"Help/Bank.htm");
desktop.add (hlpBank);
hlpBank.show ();
}

}
else if (obj == keyHelp || obj == btnKey) {

boolean b = openChildWindow ("BankSystem Keys");


if (b == false) {
BankHelp hlpKey = new BankHelp ("BankSystem Keys",
"Help/Keys.htm");
desktop.add (hlpKey);
hlpKey.show ();
}

}
else if (obj == about) {

String msg = "Blasters Bank [Pvt] Limited.\n\n" + "Created &


Designed By:\n" +
"Blasters\n\n" + "E-mail me:\n [email protected]";
JOptionPane.showMessageDialog (this, msg, "About BankSystem",
JOptionPane.PLAIN_MESSAGE);

28
}

//Function Perform By LookAndFeel Menu.

public void itemStateChanged (ItemEvent e) {

for( int i = 0; i < radio.length; i++ )


if(radio[i].isSelected()) {
changeLookAndFeel (i);
}

//Function For Closing the Program.

private void quitApp () {

try {
//Show a Confirmation Dialog.
int reply = JOptionPane.showConfirmDialog (this,
"Are you really want to exit\nFrom BankSystem?",
"BankSystem - Exit",
JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE);
//Check the User Selection.
if (reply == JOptionPane.YES_OPTION) {
setVisible (false); //Hide the Frame.
dispose(); //Free the System Resources.
System.out.println ("Thanks for Using BankSystem\n");
System.exit (0); //Close the Application.
}
else if (reply == JOptionPane.NO_OPTION) {

29
setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
}
}

catch (Exception e) {}

//Function for Changing the Program's Look.

public void changeLookAndFeel (int val) {

try {
UIManager.setLookAndFeel (looks[val].getClassName());
SwingUtilities.updateComponentTreeUI (this);
}
catch (Exception e) { }

//Loop Through All the Opened JInternalFrame to Perform the Task.

private boolean openChildWindow (String title) {

JInternalFrame[] childs = desktop.getAllFrames ();


for (int i = 0; i < childs.length; i++) {
if (childs[i].getTitle().equalsIgnoreCase (title)) {
childs[i].show ();
return true;
}
}
return false;}

30
//Following Functions use for Printing Records & Report of BankSystem.
void getAccountNo () {

String printing;
rows = 0;
boolean b = populateArray ();
if (b == false) { }
else {
try {
printing = JOptionPane.showInputDialog (this, "Enter
Account No. to Print Customer Balance.\n" +
"(Tip: Account No. Contains only Digits)", "BankSystem -
PrintRecord", JOptionPane.PLAIN_MESSAGE);
if (printing == null) { }
if (printing.equals ("")) {
JOptionPane.showMessageDialog (this, "Provide
Account No. to Print.",
"BankSystem - EmptyField",
JOptionPane.PLAIN_MESSAGE);
getAccountNo ();
}
else {
findRec (printing);
}
}
catch (Exception e) { }
}

//Function use to load all Records from File when Application Execute.

boolean populateArray () {

31
boolean b = false;
try {
fis = new FileInputStream ("Bank.dat");
dis = new DataInputStream (fis);
//Loop to Populate the Array.
while (true) {
for (int i = 0; i < 6; i++) {
records[rows][i] = dis.readUTF ();
}
rows++;
}
}
catch (Exception ex) {
total = rows;
if (total == 0) {
JOptionPane.showMessageDialog (null, "Records File is
Empty.\nEnter Records First to Display.",
"BankSystem - EmptyFile",
JOptionPane.PLAIN_MESSAGE);
b = false;
}
else {
b = true;
try {
dis.close();
fis.close();
}
catch (Exception exp) { }
}
}
return b;

32
//Function use to Find Record by Matching the Contents of Records Array with
InputBox.

void findRec (String rec) {

boolean found = false;


for (int x = 0; x < total; x++) {
if (records[x][0].equals (rec)) {
found = true;
printRecord (makeRecordPrint (x));
break;
}
}
if (found == false) {
JOptionPane.showMessageDialog (this, "Account No. " + rec + "
doesn't Exist.",
"BankSystem - WrongNo",
JOptionPane.PLAIN_MESSAGE);
getAccountNo ();
}

//Function use to make Current Record ready for Print.

String makeRecordPrint (int rec) {

String data;
String data0 = " Blasters Bank [Pvt] Limited. \n"; //Page
Title.
String data1 = " Customer Balance Report. \n\n"; //Page
Header.
String data2 = " Account No.: " + records[rec][0] + "\n";
String data3 = " Customer Name: " + records[rec][1] + "\n";

33
String data4 = " Last Transaction: " + records[rec][2] + ", " +
records[rec][3] + ", " + records[rec][4] + "\n";
String data5 = " Current Balance: " + records[rec][5] + "\n\n";
String sep0 = " -----------------------------------------------------------\n";
String sep1 = " -----------------------------------------------------------\n";
String sep2 = " -----------------------------------------------------------\n";
String sep3 = " -----------------------------------------------------------\n";
String sep4 = " -----------------------------------------------------------\n\n";

data = data0 + sep0 + data1 + data2 + sep1 + data3 + sep2 + data4 + sep3 +
data5 + sep4;
return data;

//Function use to Print the Current Record.

void printRecord (String rec) {

StringReader sr = new StringReader (rec);


LineNumberReader lnr = new LineNumberReader (sr);
Font typeface = new Font ("Times New Roman", Font.PLAIN, 12);
Properties p = new Properties ();
PrintJob pJob = getToolkit().getPrintJob (this, "Print Customer Balance
Report", p);

if (pJob != null) {
Graphics gr = pJob.getGraphics ();
if (gr != null) {
FontMetrics fm = gr.getFontMetrics (typeface);
int margin = 20;
int pageHeight = pJob.getPageDimension().height - margin;
int fontHeight = fm.getHeight();
int fontDescent = fm.getDescent();

34
int curHeight = margin;
String nextLine;
gr.setFont (typeface);

try {
do {
nextLine = lnr.readLine ();
if (nextLine != null) {
if ((curHeight + fontHeight) >
pageHeight) { //New Page.
gr.dispose();
gr = pJob.getGraphics ();
curHeight = margin;
}

curHeight += fontHeight;
if (gr != null) {
gr.setFont (typeface);
gr.drawString (nextLine,
margin, curHeight - fontDescent);
}
}
}
while (nextLine != null);
}
catch (EOFException eof) { }
catch (Throwable t) { }
}
gr.dispose();
}
if (pJob != null)
pJob.end ();
}
}

35
CHAPTER 7
SCREENSHOTS

Fig. 7.1. Create New Account

Fig. 7.2. Search Customer

36
Fig. 7.3. View All Account Holders

Fig.7.4. Delete Account Holder

37
Fig.7.5. Background color

Fig.7.6. Print

38
Fig. 7.7. Print Details

Fig. 7.8. About BankSystem

39
CHAPTER 8

CONCLUSION

E-banking offers a higher level of convenience for managing one’s


finances. However, it continues to present challenges to financial security and
personal privacy. Many people have had their account details compromised, as
a result of online banking. Thus, if one is going to use it for financial
transactions, he should be aware of the risks involved.

Awareness of the risks and problems enables him to take precautions for
a more secure online banking experience. The e-Banking system is not only
popular nationally, but also internationally, where a person can transfer money
through any part of the world. The e-banking system is useful for bankers as
well as customers of banks.

40
CHAPTER 9

REFERENCES

[1] Core Java Volume I: Fundamentals. Author: Cay S. Horstmann Audience:


Programmers seeking robust but maintainable code.

[2] Java: A Beginner’s Guide. Author: Herbert Schildt: It covers all the
fundamentals of Java, followed by tests and puzzles to test your knowledge.

[3] Spring in Action. Author: Craig Walls and Ryan Breidenbach: Spring in Action
is by far the most wide-spread and widely utilized book on the Java framework in
today’s programming landscape

[4] Thinking in Java. Author: Bruce Eckel: Thinking in Java is no beginner’s book,
but it’s a fantastic resource for intermediate to advance developers with a desire to
learn.

41

You might also like