Java Banking System

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 134

PROJECT REPORT

ON

BANKING SYSTEM

Department of Information Technology Diploma in Three Year (2011-2012)

Govt. Girls Polytechnic V r n si S!BMITTE" TO# S!BMITTE" BY#


Mrs. R sh$i Son% r Head Of Department Information Technology J&hi Sangita kumari Seema kushwaha Shweta Singh Sunita yadav

CERTIFICATE

GOVE !"E!T GI #S $O#%TE&H!I& V' '!'SI


&E TI(I&'TE

This is certified that dissertation entitled BANKING SYSTEM being submitted by JUHI, SANGITA KUMARI, SEEMA KUSHWHA, SHWETA SINGH, SUNITA YADAV in partial fullfilment of the requirement for the award of Diploma in Information Technology submitted to Govt. Girls Poly. VN is record of student own wor! carried out them under my supervision and guidance. The matter embodied in their dissertation has been submitted for the award of any other Diploma. "e recommended their dissertation for the above Diploma.

GUIDED PRINCIPAL Mrs. RASHMI SONKAR P.C. Varma DATE: VARANASI

BY: Mr. PLACE:

AC !"#$ED%E&E!T

ACKNO'(E"GEMENT
It was a great pleasure to experience the development of project over )*'!+I!G S%STE",- The assignment was quite complexed. But due to the kind support of my teachers provided by G !"#$%"$T GI#&' ( &)T"*+$I* !,#,$,'I- it become easy for us. I wish to thanks %rs. #ashmi 'onkar for providing a proper guideline to prepare this project report on .B,$/I$G ')'T"%0 based on .I$1 #%,TI $ T"*+$ & G)0 under their guidance. I am grateful to %r. (.*.!arma- the principal of GG( !$' for provided me institution facilities.

'()I

*A!%ITA (&ARI *EE&A (*)#A)A *)#ETA *I!%) *(!ITA YADA+ I,T, FI!A$ YEAR

-REFACE

$ E('&E
This system is dedicated made from Government Girls (olytechnic. 2e are the student of 3iploma final year- Information technology at varanasi. 2e are submitted the preface on .B,$/I$G ')'T"%0. 'ince the last few year the demand of computer automation has been growing rapidly- reason being that cost of computer network is growing continuously while specific software product are giving more precise and optimum result. (ractical knowledge has vital importance to consider the theoretical knowledge. 'o often it is said that learning by doing a good habbit.

$ow we will come to the real life problem in banking and see how we can solve them. 2e have used the 43/ 5.6 under the windows o.s. for the preparation of project- Basically this project is consist of operation that is required for banking. 7sing object oriented approach we create a project on )*'!+I!G S%STE",

C"!TE!T*

&O!TE!TS
./ I!T OD0&TIO! 1/ $ O2E&T O*2E&TIVES 3/ (E'SI*I#IT% '!'#%SIS 4/ SO(T5' E E60I "E!T S$E&I(I&'TIO! 7/ $ O2E&T DESIG! 3ata 1low 3iagram

" # 3iagram 8/ SO0 &E &ODE 9/ O0T$0T S& EE! :/ TESTI!G ;/ &O!&#0SIO! .</ (0T0 E S&O$E

../ *I*#OG '$H%

I!TR"D(CTI"!

I!T OD0&TIO!
This project is based on the software program which is a low level Bank 'ystem which can handles the low level bank management easily. It can be use by the bussiness men who wants to remember their Account Status everyday. It going to be very handy for all of them as working in it very very easy as compare to the complex programs like it which is not only

difficult to understand but also most of people feel difficulty while using these programs. This software program is very useful to maintain the information about the customer account.

OBJECTIVE OF THE

-R"'ECT

O*2E&TIVE O( THE $ O2E&T

The main objective of the project is to centrali8e the whole information as ,ccount no.- $ame- pening 3ate 9 also the Bank balance of the all account holders. This software program is used to create a new account- to print customer balance- to edit or update the information of all account holders. This software program is much more useful for Bank management 9 it can be also used by the bussinessman who wants to remember their account status everyday.

FEA*I.I$ITY

A!A$Y*I*

(E'SI*I#IT% '!'#%SIS
O$E 'TIO!'# (E'SI*I#IT%=
The purposed project will be turn in to information system that will be complete information related to the .B,$/I$G ')'T"%0 by which everyone can be satisfied. +owever- this test feasibility will give result after the development of the project so I have not to ignore any side.

TE&H!I&'# (E'SI*I#IT%=
The general configuration of the personal computer contain by the adviser is +33 :; GB- Intel<#=core:duo processor- modem >?.>/bps- #,% >@ %B we think above configuration is sufficient for the purpose we have to develop a system-which can run on personal computers with high speed and satisfied the advisors need.

E&O!O"I&'# (E'SI*I#IT%=
The purposed project will turned in to information system with minor technical changes as so this project will be cost effective and beneficial for each advisor.

*"FT#ARE RE/(IR&E!T *-ECIFICATI"!

SO(T5' E E60I "E!T S$E&I(I&'TIO!


To develop the architecture system for this project we have used the following toolsA (ront End= 43/ 5.6 , powerful object oriented programming language used to make user interface application .

$latform= 'B& 'erver , multitasking- multiprogramming- G7I operating system- designed to be easy to use- developed by 'B&

*Y*TE& DE*I%!

S%STE" DESIG!
nce the specification are accepted by the management an analyst gets on to design of the system. The analyst must be aware of the latest design tools for the system design. ,s part of the design analyst should create test plan for the system. 'ystem analyst are also called architects because they design and implement new system. In system design process- the primary objective is to identify user requirements 9 to build a system that satisfy these requirements. 3esign of system is largely the logical design. The logical design can be sketched on a paper or on a computer terminal. The design- also including the physical

design element- describe the data to be inputted- the processes involved in the manipulation of data and output. The system design is the important step of system development life cycle. 3uring this phase analyst does the following activities A

5. :. 6. @. ?. >. C. D. E.

The analyst should the file structures- storage devices etc. 'chedules design activities. The data base is also designed in this phase. 2ork with the user to determine the different data input to the system. 3raws a model of the new system - using 313 9 "# diagram. 3efines the data requirements with the data dictionary. 2rites program specification. Identifies 9 orders any hardware or software that the system designed phase would need. 1inally standards for testing- documentation and system control are formulated.

DATA F$"# DIA%RA&

D'T' (#O5 DI'G '"


, 313 also has knows as a .bubble chart0 has the purpose of clarifying system and identifying major transformation that will become programs in system design. 'o it is the starting point of the design page that functionally decomposes the requirements specification down to the lowest level of details. , 313 consist of a series of bubbles joined by lines. The bubbles represent data transformation and the lines represents data flows in the system.

$ O&ESS=> (rocess is the work or action performed on data so that they are transform stored or distributed.2hen the modeling the data processing of a system it does not matter whether a process is performed manually or by a computer. D'T' STO E=> , data store is data at rest. , data store may represent one of many different physical locations for data- for example a file folder. SO0 &E? SI!+=> , source F sink is the origin 9 the destination of the data. 'ource F sink are some times referred to as external entities because they are out side the system. once passward- data or information leave a system 9 go to some other place.

D'T' (#O5
, data flow can be best understood as data in motion- moving from one place in a system to another. , data flow could represent data on a customer order from a payroll check.

Source or destination of data

$rocess data transform data flow

Data store

Data flow

Data (low Diagram

7pdate Balance

3eposite %oney

*ashier 2ithdraw %oney *ustomer

*heck Balance

%anager

Take out &oan

E Diagram

$ame ,ccount balance

pening date

*ustomer

3eposite r

,ccount

,ccount $o.

C"DI!%

&ODI!G
import javax.swing.plaf.GH import javax.swing.plaf.metal.GH import javax.swing.GH import javax.swing.border.GH import java.awt.GH public class ,quaTheme extends 3efault%etalTheme I public 'tring get$ame<= I return J(ure ,quaJH K private final *olor7I#esource primary5 L new *olor7I#esource<5;:- 5?6- 5?6=H private final *olor7I#esource primary: L new *olor7I#esource<5:D- 5E:- 5E:=H private final *olor7I#esource primary6 L new *olor7I#esource<5?E- :6?- :6?=H private final *olor7I#esource secondary: L new *olor7I#esource<:;@- :;@- :;@=H private final *olor7I#esource secondary6 L new *olor7I#esource<5>;- ::?- ::?=H protected *olor7I#esource get(rimary5<= I return primary5H K protected *olor7I#esource get(rimary:<= I return primary:H K protected *olor7I#esource get(rimary6<= I return primary6H K protected *olor7I#esource get'econdary:<= I return secondary:H K protected *olor7I#esource get'econdary6<= I return secondary6H K K

import javax.swing.GH import java.awt.GH import java.net.7#&H import java.net.%alformed7#&"xceptionH import java.io.GH import javax.swing.text.GH import javax.swing.event.GH public class Bank+elp extends 4Internal1rame I public Bank+elp <'tring title- 'tring filename= I FF super<Title- #esi8able- *losable- %aximi8able- Iconifiable= super <title- false- true- false- true=H set'i8e <?;;- 6?;=H +tml(ane html L new +tml(ane <filename=H set*ontent(ane <html=H set!isible <true=H K K class +tml(ane extends 4'croll(ane implements +yperlink&istener I 4"ditor(ane htmlH public +tml(ane<'tring filename= I try I 1ile f L new 1ile <filename=H 'tring s L f.get,bsolute(ath<=H s L JfileAJMsH

7#& url L new 7#&<s=H html L new 4"ditor(ane<s=H html.set"ditable<false=H html.add+yperlink&istener<this=H 4!iewport vp L get!iewport<=H vp.add<html=H K catch <%alformed7#&"xception e= I 'ystem.out.println<J%alformed 7#&A J M e=H K catch <I "xception e= I 'ystem.out.println<JI "xceptionA J M e=H K K public void hyperlink7pdate<+yperlink"vent e= I if <e.get"ventType<= LL +yperlink"vent."ventType.,*TI!,T"3= I link,ctivated<e.get7#&<==H K K protected void link,ctivated<7#& u= I *ursor c L html.get*ursor<=H *ursor wait*ursor L *ursor.get(redefined*ursor<*ursor.2,ITN*7#' #=H html.set*ursor<wait*ursor=H 'wing7tilities.invoke&ater<new (age&oader<u- c==H K class (age&oader implements #unnable I (age&oader<7#& u- *ursor c= I url L uH cursor L cH K public void run<= I if <url LL null= I html.set*ursor<cursor=H *ontainer parent L html.get(arent<=H

parent.repaint<=H K else I 3ocument doc L html.get3ocument<=H try I html.set(age<url=H K catch <I "xception ioe= I html.set3ocument<doc=H getToolkit<=.beep<=H K finally I url L nullH 'wing7tilities.invoke&ater<this=H K K K 7#& urlH *ursor cursorH K K K

import java.awt.GH import java.awt.event.GH import javax.swing.GH import javax.swing.event.GH import java.util.GH import java.text.GH import java.io.GH import java.awt.(rint4ob.GH import javax.swing.plaf.metal.GH public class Bank'ystem extends 41rame implements ,ction&istenerItem&istener I FF%ain (lace on 1orm where ,ll *hild 1orms will 'hown. private 43esktop(ane desktop L new 43esktop(ane <=H FF1or (rogramOs %enuBar. private 4%enuBar barH FF,ll the %ain %enu of the (rogram. private 4%enu mnu1ile- mnu"dit- mnu!iew- mnu pt- mnu2in- mnu+elpH private 4%enuItem add$ew- print#ec- endH FF1ile %enu ptions. private 4%enuItem depositwithdraw- del#ec- search- search$ameH FF"dit %enu ptions. private 4%enuItem oneBy neall*ustomerH FF!iew %enu ptions. private 4%enuItem change- stylethemeH FF pt ion %enu ptions.

private 4%enuItem close- close,llH private key+elp- aboutH %enu ptions. FF(opup%enu of (rogram. private 4(opup%enu pop%enu L new 4(opup%enu <=H FF%enuItems for (opup%enu of the (rogram. private 4%enuItem open- report- dep- with- del- find- allH FF1or (rogramOs ToolBar. private 4ToolBar toolBarH FF1or ToolBarOs Button. private 4Button btn$ew- btn3epbtn2ith- btn#ec- btn3el- btn'rch- btn+elp- btn/eyH FF%ain 1orm 'tatusBar where (rogramOs $ame 9 2elcome %essage 3isplay. private 4(anel statusBar L new 4(anel <=H FF&abels for 3isplaying (rogramOs $ame 9 saying 2elcome to *urrent 7ser on 'tatusBar. private 4&abel welcomeH private 4&abel authorH FF%aking the &ook,nd1eel %enu. private 'tring stringsPQ L IJ5. %etalJ- J:. %otifJ- J6. 2indowsJKH private 7I%anager.&ook,nd1eelInfo looksPQ L 7I%anager.getInstalled&ook,nd1eels <=H private ButtonGroup group L new ButtonGroup <=H private 4#adioButton%enuItem radioPQ L new 4#adioButton%enuItemPstrings.lengthQH FFGetting the *urrent 'ystem 3ate. private java.util.3ate curr3ate L new java.util.3ate <=H private 'imple3ate1ormat sdf L new 'imple3ate1ormat <Jdd %%%% yyyyJ- &ocale.get3efault<==H private 'tring d L sdf.format <curr3ate=H FF1ollowing all !ariables are use in Bank'ystemOs I Os. FF!ariable use in #eading the Bank'ystem #ecords 1ile 9 'tore it in an ,rray. private int count L ;H private int rows L ;H private int total L ;H FF2indow %enu ptions. 4%enuItem contentFF+elp

FF'tring Type ,rray use to &oad #ecords 1rom 1ile. private 'tring recordsPQPQ L new 'tring P?;;QP>QH FF!ariable for #eading the Bank'ystem #ecords 1ile. private 1ileInput'tream fisH private 3ataInput'tream disH FF*onstructor of The Bank (rogram to Iniatili8e all !ariables of (rogram. public Bank'ystem <= I FF'etting (rogramOs Title. super <JBanking 'ystemJ=H 7I%anager.add(roperty*hange&istener <new 7I'witch&istener <<4*omponent=get#oot(ane<===H FF*reating the %enuBar. bar L new 4%enuBar <=H FF'etting the %ain 2indow of (rogram. setIconImage <getToolkit<=.getImage <JImagesFBank.gifJ==H set'i8e <C;;- ??;=H set4%enuBar <bar=H FF*losing *ode of %ain 2indow. add2indow&istener <new 2indow,dapter <= I public void window*losing <2indow"vent we= I quit,pp <=H K K =H FF'etting the &ocation of ,pplication on 'creen. set&ocation<<Toolkit.get3efaultToolkit<=.get'creen'i8e<=.width R get2idth<== F :<Toolkit.get3efaultToolkit<=.get'creen'i8e<=.height R get+eight<== F :=H FF*reating the %enuBar Items. mnu1ile L new 4%enu <J1ileJ=H mnu1ile.set%nemonic <<int=O1O=H mnu"dit L new 4%enu <J"ditJ=H mnu"dit.set%nemonic <<int=O"O=H mnu!iew L new 4%enu <J!iewJ=H mnu!iew.set%nemonic <<int=O!O=H mnu pt L new 4%enu <J ptionsJ=H mnu pt.set%nemonic <<int=O O=H mnu2in L new 4%enu <J2indowJ=H

mnu2in.set%nemonic <<int=O2O=H mnu+elp L new 4%enu <J+elpJ=H mnu+elp.set%nemonic <<int=O+O=H FF*reating the %enuItems of (rogram. FF%enuItems for 1ile%enu. add$ew L new 4%enuItem <J pen $ew ,ccountJ- new ImageIcon <JImagesF pen.gifJ==H add$ew.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N$"vent.*T#&N%,'/==H add$ew.set%nemonic <<int=O$O=H add$ew.add,ction&istener <this=H print#ec L new 4%enuItem <J(rint *ustomer BalanceJ- new ImageIcon <JImagesF$ew.gifJ==H print#ec.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N#"vent.*T#&N%,'/==H print#ec.set%nemonic <<int=O#O=H print#ec.add,ction&istener <this=H end L new 4%enuItem <JBuit Banking 'ystem SJ- new ImageIcon <JImagesFexport.gifJ==H end.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/NB"vent.*T#&N%,'/==H end.set%nemonic <<int=OBO=H end.add,ction&istener <this=H FF%enuItems for "dit%enu. deposit L new 4%enuItem <J3eposit %oneyJ=H deposit.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/NT"vent.*T#&N%,'/==H deposit.set%nemonic <<int=OTO=H deposit.add,ction&istener <this=H withdraw L new 4%enuItem <J2ithdraw %oneyJ=H withdraw.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N2"vent.*T#&N%,'/==H withdraw.set%nemonic <<int=O2O=H withdraw.add,ction&istener <this=H del#ec L new 4%enuItem <J3elete *ustomerJ- new ImageIcon <JImagesF3elete.gifJ==H del#ec.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N3"vent.*T#&N%,'/==H del#ec.set%nemonic <<int=O3O=H

del#ec.add,ction&istener <this=H search L new 4%enuItem <J'earch By $o.J- new ImageIcon <JImagesFfind.gifJ==H search.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N'"vent.*T#&N%,'/==H search.set%nemonic <<int=O'O=H search.add,ction&istener <this=H search$ame L new 4%enuItem <J'earch By $ameJ=H search$ame.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N%"vent.*T#&N%,'/==H search$ame.set%nemonic <<int=O%O=H search$ame.add,ction&istener <this=H FF%enuItems for !iew%enu. oneBy ne L new 4%enuItem <J!iew ne By neJ=H oneBy ne.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N "vent.*T#&N%,'/==H oneBy ne.set%nemonic <<int=O O=H oneBy ne.add,ction&istener <this=H all*ustomer L new 4%enuItem <J!iew ,ll *ustomerJ- new ImageIcon <JImagesFrefresh.gifJ==H all*ustomer.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N,"vent.*T#&N%,'/==H all*ustomer.set%nemonic <<int=O,O=H all*ustomer.add,ction&istener <this=H FF%enuItems for ption%enu. change L new 4%enuItem <J*hange Background *olorJ=H change.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/NB"vent.*T#&N%,'/==H change.set%nemonic <<int=OBO=H change.add,ction&istener <this=H FF%enu 1or *hanging the (rogramOs &ayout. style L new 4%enu <J*hange &ayout 'tyleJ=H style.set%nemonic <<int=O&O=H for< int i L ;H i T radio.length H iMM = I radioPiQ L new 4#adioButton%enuItem <stringsPiQ=H radioPiQ.addItem&istener <this=H group.add <radioPiQ=H style.add <radioPiQ=H K

FF'ub%enu of Theme 1or ,pplying different Themes to (rogram By Building an ,rray of Themes to ,pply. %etalThemePQ themes L I new 3efault%etalTheme<=- new GreenTheme<=new ,quaTheme<=new 'andTheme<=- new 'olidTheme<=- new %ilkyTheme<=- new GrayTheme<= KH theme L new %etalTheme%enu <J,pply ThemeJ- themes=H FF(utting the Themes in Theme%enu. theme.set%nemonic <<int=O%O=H FF%enuItems for 2indow%enu. close L new 4%enuItem <J*lose ,ctive 2indowJ=H close.set%nemonic <<int=O*O=H close.add,ction&istener <this=H close,ll L new 4%enuItem <J*lose ,ll 2indows...J=H close,ll.set%nemonic <<int=O,O=H close,ll.add,ction&istener <this=H FF%enuItems for +elp%enu. content L new 4%enuItem <J+elp *ontentsJ- new ImageIcon <JImagesFpaste.gifJ==H content.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N+"vent.*T#&N%,'/==H content.set%nemonic <<int=O+O=H content.add,ction&istener <this=H key+elp L new 4%enuItem <J+elp on 'hortcuts...J=H key+elp.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N/"vent.*T#&N%,'/==H key+elp.set%nemonic <<int=O/O=H key+elp.add,ction&istener <this=H about L new 4%enuItem <J,bout Bank'ystemJ- new ImageIcon <JImagesF'ave.gifJ==H about.set,ccelerator </ey'troke.get/ey'troke</ey"vent.!/N*"vent.*T#&N%,'/==H about.set%nemonic <<int=O*O=H about.add,ction&istener <this=H FF,dding %enuItems to %enu. FF1ile %enu Items. mnu1ile.add <add$ew=H mnu1ile.add'eparator <=H

mnu1ile.add <print#ec=H mnu1ile.add'eparator <=H mnu1ile.add <end=H FF"dit %enu Items. mnu"dit.add <deposit=H mnu"dit.add <withdraw=H mnu"dit.add'eparator <=H mnu"dit.add <del#ec=H mnu"dit.add'eparator <=H mnu"dit.add <search=H mnu"dit.add <search$ame=H FF!iew %enu Items. mnu!iew.add <oneBy ne=H mnu!iew.add'eparator <=H mnu!iew.add <all*ustomer=H FF ptions %enu Items. mnu pt.add <change=H mnu pt.add'eparator <=H mnu pt.add <style=H mnu pt.add'eparator <= mnu pt.add <theme=H FF2indow %enu Items. mnu2in.add <close=H mnu2in.add <close,ll=H FF+elp %enu Items. FF mnu+elp.add <content=H FF mnu+elp.add'eparator <=H mnu+elp.add <key+elp=H mnu+elp.add'eparator <=H mnu+elp.add <about=H FF,dding %enues to Bar. bar.add <mnu1ile=H bar.add <mnu"dit=H bar.add <mnu!iew=H bar.add <mnu pt=H bar.add <mnu2in=H bar.add <mnu+elp=H FF%enuItems for (opup%enu.

open L new 4%enuItem <J pen $ew ,ccountJ- new ImageIcon <JImagesF pen.gifJ==H open.add,ction&istener <this=H report L new 4%enuItem <J(rint Bank'ystem #eportJ- new ImageIcon <JImagesF$ew.gifJ==H report.add,ction&istener <this=H dep L new 4%enuItem <J3eposit %oneyJ=H dep.add,ction&istener <this=H with L new 4%enuItem <J2ithdraw %oneyJ=H with.add,ction&istener <this=H del L new 4%enuItem <J3elete *ustomerJ- new ImageIcon <JImagesF3elete.gifJ==H del.add,ction&istener <this=H find L new 4%enuItem <J'earch *ustomerJ- new ImageIcon <JImagesFfind.gifJ==H find.add,ction&istener <this=H all L new 4%enuItem <J!iew ,ll *ustomerJ- new ImageIcon <JImagesFrefresh.gifJ==H all.add,ction&istener <this=H FF,dding %enues to (opup%enu. pop%enu.add <open=H pop%enu.add <report=H pop%enu.add <dep=H pop%enu.add <with=H pop%enu.add <del=H pop%enu.add <find=H pop%enu.add <all=H FF1ollowing (rocedure display the (opup%enu of (rogram. add%ouse&istener <new %ouse,dapter <= I public void mouse(ressed <%ouse"vent me= I check%ouseTrigger <me=H K public void mouse#eleased <%ouse"vent me= I check%ouseTrigger <me=H K private void check%ouseTrigger <%ouse"vent me= I if <me.is(opupTrigger <== pop%enu.show <me.get*omponent <=- me.getU <=- me.get) <==H K K =H

FF*reating the ToolBarOs Buttons of (rogram. btn$ew L new 4Button <new ImageIcon <JImagesF$ote(ad.gifJ==H btn$ew.setToolTipText <J*reate $ew ,ccountJ=H btn$ew.add,ction&istener <this=H btn3ep L new 4Button <new ImageIcon <JImagesFImation3isk.gifJ==H btn3ep.setToolTipText <J3eposit %oneyJ=H btn3ep.add,ction&istener <this=H btn2ith L new 4Button <new ImageIcon <JImagesF'uper3isk.gifJ==H btn2ith.setToolTipText <J2ithdraw %oneyJ=H btn2ith.add,ction&istener <this=H btn#ec L new 4Button <new ImageIcon <JImagesF(aproll.gifJ==H btn#ec.setToolTipText <J(rint *ustomer BalanceJ=H btn#ec.add,ction&istener <this=H btn3el L new 4Button <new ImageIcon <JImagesFToaster.gifJ==H btn3el.setToolTipText <J3elete *ustomerJ=H btn3el.add,ction&istener <this=H btn'rch L new 4Button <new ImageIcon <JImagesF'earch.gifJ==H btn'rch.setToolTipText <J'earch *ustomerJ=H btn'rch.add,ction&istener <this=H btn+elp L new 4Button <new ImageIcon <JImagesF+elp.gifJ==H btn+elp.setToolTipText <J+elp on Bank 'ystemJ=H btn+elp.add,ction&istener <this=H btn/ey L new 4Button <new ImageIcon <JImagesF/eys.gifJ==H btn/ey.setToolTipText <J'hortcut /eys of Bank'ystemJ=H btn/ey.add,ction&istener <this=H FF*reating the ToolBar of (rogram. toolBar L new 4ToolBar <=H toolBar.add <btn$ew=H toolBar.add'eparator <=H toolBar.add <btn3ep=H toolBar.add <btn2ith=H toolBar.add'eparator <=H toolBar.add <btn#ec=H toolBar.add'eparator <=H toolBar.add <btn3el=H toolBar.add'eparator <=H toolBar.add <btn'rch=H toolBar.add'eparator <=H toolBar.add <btn+elp=H

toolBar.add <btn/ey=H FF*reating the 'tatusBar of (rogram. author L new 4&abel <J J M JBanking 'ystemJ- &abel.&"1T=H author.set1oreground <*olor.black=H author.setToolTipText <J(rogramOs TitleJ=H welcome L new 4&abel <J2elcome Today is J M d M J J- 4&abel.#IG+T=H welcome.set1oreground <*olor.black=H welcome.setToolTipText <J2elcoming the 7ser 9 'ystem *urrent 3ateJ=H statusBar.set&ayout <new Border&ayout<==H statusBar.add <author- Border&ayout.2"'T=H statusBar.add <welcome- Border&ayout.",'T=H FF1or %aking the 3ragging 'peed of Internal 1rames 1aster. desktop.put*lient(roperty <J43esktop(ane.drag%odeJ- JoutlineJ=H FF'etting the *ontents of (rograms. get*ontent(ane<=.add <toolBar- Border&ayout.$ #T+=H get*ontent(ane<=.add <desktop- Border&ayout.*"$T"#=H get*ontent(ane<=.add <statusBar- Border&ayout.' 7T+=H FF'howing The %ain 1orm of ,pplication. set!isible <true=H K FF1unction 1or (erforming different ,ctions By %enus of (rogram. public void action(erformed <,ction"vent ae= I bject obj L ae.get'ource<=H if <obj LL add$ew VV obj LL open VV obj LL btn$ew= I boolean b L open*hild2indow <J*reate $ew ,ccountJ=H if <b LL false= I $ew,ccount new,cc L new $ew,ccount <=H desktop.add <new,cc=H new,cc.show <=H K K else if <obj LL print#ec VV obj LL btn#ec VV obj LL report= I get,ccount$o <=H K else if <obj LL end= I quit,pp <=H K else if <obj LL deposit VV obj LL dep VV obj LL btn3ep= I

boolean b L open*hild2indow <J3eposit %oneyJ=H if <b LL false= I 3eposit%oney dep%on L new 3eposit%oney <=H desktop.add <dep%on=H dep%on.show <=H K K else if <obj LL withdraw VV obj LL with VV obj LL btn2ith= I boolean b L open*hild2indow <J2ithdraw %oneyJ=H if <b LL false= I 2ithdraw%oney with%on L new 2ithdraw%oney <=H desktop.add <with%on=H with%on.show <=H K K else if <obj LL del#ec VV obj LL del VV obj LL btn3el= I boolean b L open*hild2indow <J3elete ,ccount +olderJ=H if <b LL false= I 3elete*ustomer del*us L new 3elete*ustomer <=H desktop.add <del*us=H del*us.show <=H K K else if <obj LL search VV obj LL find VV obj LL btn'rch= I boolean b L open*hild2indow <J'earch *ustomer PBy $o.QJ=H if <b LL false= I 1ind,ccount fnd,cc L new 1ind,ccount <=H desktop.add <fnd,cc=H fnd,cc.show <=H K K else if <obj LL search$ame= I boolean b L open*hild2indow <J'earch *ustomer PBy $ameQJ=H if <b LL false= I 1ind$ame fnd$m L new 1ind$ame <=H desktop.add <fnd$m=H fnd$m.show <=H K K

else if <obj LL oneBy ne= I boolean b L open*hild2indow <J!iew ,ccount +oldersJ=H if <b LL false= I !iew ne vw ne L new !iew ne <=H desktop.add <vw ne=H vw ne.show <=H K K else if <obj LL all*ustomer VV obj LL all= I boolean b L open*hild2indow <J!iew ,ll ,ccount +oldersJ=H if <b LL false= I !iew*ustomer view*us L new !iew*ustomer <=H desktop.add <view*us=H view*us.show <=H K K else if <obj LL change= I *olor cl L new *olor <5?6- 5?6- :;@=H cl L 4*olor*hooser.show3ialog <this- J*hoose Background *olorJ- cl=H if <cl LL null= I K else I desktop.setBackground <cl=H desktop.repaint <=H K K else if <obj LL close= I try I desktop.get'elected1rame<=.set*losed<true=H K catch <"xception *lose"xc= I K K else if <obj LL close,ll= I 4Internal1rame 1ramesPQ L desktop.get,ll1rames <=H FFGetting all pen 1rames. for<int get1rame&oop L ;H get1rame&oop T 1rames.lengthH get1rame&oopM M= I try I 1ramesPget1rame&oopQ.set*losed <true=H FF*lose the frame. K

catch <"xception *lose"xc= I K FFif we canOt close it then we have a problem. K K else if <obj LL content VV obj LL btn+elp= I boolean b L open*hild2indow <JBanking 'ystem +elpJ=H if <b LL false= I Bank+elp hlpBank L new Bank+elp <JBanking 'ystem +elpJJ+elpFBank.htmJ=H desktop.add <hlpBank=H hlpBank.show <=H K K else if <obj LL key+elp VV obj LL btn/ey= I boolean b L open*hild2indow <JBank'ystem /eysJ=H if <b LL false= I Bank+elp hlp/ey L new Bank+elp <JBank'ystem /eysJJ+elpF/eys.htmJ=H desktop.add <hlp/ey=H hlp/ey.show <=H K K else if <obj LL about= I 'tring msg L JBanking 'ystem.WnWnJ M J*reated 9 3esigned ByAWnJ M JfriendsWnWnJ M J"Rmail meAWn friends55Xgmail.comJH 4 ption(ane.show%essage3ialog <this- msg- J,bout Bank'ystemJ4 ption(ane.(&,I$N%"'',G"=H K K FF1unction (erform By &ook,nd1eel %enu. public void item'tate*hanged <Item"vent e= I for< int i L ;H i T radio.lengthH iMM = if<radioPiQ.is'elected<== I change&ook,nd1eel <i=H K K FF1unction 1or *losing the (rogram. private void quit,pp <= I try I

FF'how a *onfirmation 3ialog. int reply L 4 ption(ane.show*onfirm3ialog <thisJ,re you really want to exitWn1rom Banking 'ystemSJJBank'ystem R "xitJ- 4 ption(ane.)"'N$ N (TI $4 ption(ane.(&,I$N%"'',G"=H FF*heck the 7ser 'election. if <reply LL 4 ption(ane.)"'N (TI $= I set!isible <false=H FF+ide the 1rame. dispose<=H FF1ree the 'ystem #esources. 'ystem.out.println <JThanks for 7sing Banking 'ystemJ=H 'ystem.exit <;=H FF*lose the ,pplication. K else if <reply LL 4 ption(ane.$ N (TI $= I set3efault*lose peration<41rame.3 N$ T+I$GN $N*& '"=H K K catch <"xception e= IK K FF1unction for *hanging the (rogramOs &ook. public void change&ook,nd1eel <int val= I try I 7I%anager.set&ook,nd1eel <looksPvalQ.get*lass$ame<==H 'wing7tilities.update*omponentTree7I <this=H K catch <"xception e= I K K FF&oop Through ,ll the pened 4Internal1rame to (erform the Task. private boolean open*hild2indow <'tring title= I 4Internal1ramePQ childs L desktop.get,ll1rames <=H for <int i L ;H i T childs.lengthH iMM= I if <childsPiQ.getTitle<=.equalsIgnore*ase <title== I childsPiQ.show <=H return trueH K K return falseH K void get,ccount$o <= I

'tring printingH rows L ;H boolean b L populate,rray <=H if <b LL false= I K else I try I printing L 4 ption(ane.showInput3ialog <this- J"nter ,ccount $o. to (rint *ustomer Balance.WnJ M J<TipA ,ccount $o. *ontains only 3igits=J- JBanking 'ystem R (rint#ecordJ- 4 ption(ane.(&,I$N%"'',G"=H if <printing LL null= I K if <printing.equals <JJ== I 4 ption(ane.show%essage3ialog <this- J(rovide ,ccount $o. to (rint.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H get,ccount$o <=H K else I find#ec <printing=H K K catch <"xception e= I K K K boolean populate,rray <= I boolean b L falseH try I fis L new 1ileInput'tream <JBank.datJ=H dis L new 3ataInput'tream <fis=H FF&oop to (opulate the ,rray. while <true= I for <int i L ;H i T >H iMM= I recordsProwsQPiQ L dis.read7T1 <=H K rowsMMH K K catch <"xception ex= I total L rowsH if <total LL ;= I

4 ption(ane.show%essage3ialog <null- J#ecords 1ile is "mpty.Wn"nter #ecords 1irst to 3isplay.JJBank'ystem R "mpty1ileJ- 4 ption(ane.(&,I$N%"'',G"=H b L falseH K else I b L trueH try I dis.close<=H fis.close<=H K catch <"xception exp= I K K K return bH K void find#ec <'tring rec= I boolean found L falseH for <int x L ;H x T totalH xMM= I if <recordsPxQP;Q.equals <rec== I found L trueH print#ecord <make#ecord(rint <x==H breakH K K if <found LL false= I 4 ption(ane.show%essage3ialog <this- J,ccount $o. J M rec M J doesnOt "xist.JJBank'ystem R 2rong$oJ- 4 ption(ane.(&,I$N%"'',G"=H get,ccount$o <=H K K FF1unction use to make *urrent #ecord ready for (rint. 'tring make#ecord(rint <int rec= I 'tring dataH 'tring data; L J Banking 'ystem. WnJH FF(age Title. 'tring data5 L J *ustomer Balance #eport. WnWnJH FF(age +eader. 'tring data: L J ,ccount $o.A J M recordsPrecQP;Q M JWnJH

'tring data6 L J *ustomer $ameA J M recordsPrecQP5Q M JWnJH 'tring data@ L J &ast TransactionA J M recordsPrecQP:Q M J- J M recordsPrecQ P6Q M J- J M recordsPrecQP@Q M JWnJH 'tring data? L J *urrent BalanceA J M recordsPrecQP?Q M JWnWnJH 'tring data> L J (rankur Garg.WnJH FF(age 1ooter. 'tring sep; L J RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRWnJH 'tring sep5 L J RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRWnJH 'tring sep: L J RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRWnJH 'tring sep6 L J RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRWnJH 'tring sep@ L J RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRWnWnJH data L data; M sep; M data5 M data: M sep5 M data6 M sep: M data@ M sep6 M data? M sep@ M data>H return dataH K FF1unction use to (rint the *urrent #ecord. void print#ecord <'tring rec= I 'tring#eader sr L new 'tring#eader <rec=H &ine$umber#eader lnr L new &ine$umber#eader <sr=H 1ont typeface L new 1ont <JTimes $ew #omanJ- 1ont.(&,I$- 5:=H (roperties p L new (roperties <=H (rint4ob p4ob L getToolkit<=.get(rint4ob <this- J(rint *ustomer Balance #eportJ- p=H if <p4ob YL null= I Graphics gr L p4ob.getGraphics <=H if <gr YL null= I 1ont%etrics fm L gr.get1ont%etrics <typeface=H int margin L :;H int page+eight L p4ob.get(age3imension<=.height R marginH int font+eight L fm.get+eight<=H int font3escent L fm.get3escent<=H int cur+eight L marginH 'tring next&ineH gr.set1ont <typeface=H try I do I next&ine L lnr.read&ine <=H if <next&ine YL null= I if <<cur+eight M font+eight= Z page+eight= I FF$ew (age.

gr.dispose<=H gr L p4ob.getGraphics <=H cur+eight L marginH K cur+eight ML font+eightH if <gr YL null= I gr.set1ont <typeface=H gr.draw'tring <next&ine- margin- cur+eight R font3escent=H K K K while <next&ine YL null=H K catch <" 1"xception eof= I K catch <Throwable t= I K K gr.dispose<=H K if <p4ob YL null= p4ob.end <=H K public static void main<'tring argsPQ= I Bank'ystem b5Lnew Bank'ystem<=H b5.set!isible<true=H K K import java.awt.GH import java.awt.event.GH import javax.swing.GH import java.io.GH public class 3elete*ustomer extends 4Internal1rame implements ,ction&istener I private 4(anel jp3el L new 4(anel<=H private 4&abel lb$o- lb$ame- lb3ate- lbBalH private 4Text1ield txt$o- txt$ame- txt3ate- txtBalH

private 4Button btn3el- btn*ancelH private int rec*ount L ;H private int rows L ;H private int total L ;H FF'tring Type ,rray use to &oad #ecords 1rom 1ile. private 'tring recordsPQPQ L new 'tring P?;;QP>QH private 1ileInput'tream fisH private 3ataInput'tream disH 3elete*ustomer <= I FF super<Title- #esi8able- *losable- %aximi8able- Iconifiable= super <J3elete ,ccount +olderJ- false- true- false- true=H set'i8e <6?;- :6?=H jp3el.set&ayout <null=H lb$o L new 4&abel <J,ccount $oAJ=H lb$o.set1oreground <*olor.black=H lb$o.setBounds <5?- :;- D;- :?lb$ame L new 4&abel <J(erson $ameAJ=H lb$ame.set1oreground <*olor.black=H lb$ame.setBounds <5?- ??- E;- :?=H lb3ate L new 4&abel <J&ast TransactionAJ=H lb3ate.set1oreground <*olor.black=H lb3ate.setBounds <5?- E;- 5;;- :?=H lbBal L new 4&abel <JBalanceAJ=H lbBal.set1oreground <*olor.black=H lbBal.setBounds <5?- 5:?- D;- :?=H txt$o L new 4Text1ield <=H txt$o.set+ori8ontal,lignment <4Text1ield.#IG+T=H txt$o.setBounds <5:?- :;- :;;- :?=H txt$ame L new 4Text1ield <=H txt$ame.set"nabled <false=H txt$ame.setBounds <5:?- ??- :;;- :?=H txt3ate L new 4Text1ield <=H txt3ate.set"nabled <false=H txt3ate.setBounds <5:?- E;- :;;- :?=H txtBal L new 4Text1ield <=H txtBal.set"nabled <false=H txtBal.set+ori8ontal,lignment <4Text1ield.#IG+T=H txtBal.setBounds <5:?- 5:?- :;;- :?=H FF,ligning The Buttons. btn3el L new 4Button <J3eleteJ=H

btn3el.setBounds <:;- 5>?- 5:;- :?=H btn3el.add,ction&istener <this=H btn*ancel L new 4Button <J*ancelJ=H btn*ancel.setBounds <:;;- 5>?- 5:;- :?=H btn*ancel.add,ction&istener <this=H FF,dding the ,ll the *ontrols to (anel. jp3el.add <lb$o=H jp3el.add <txt$o=H jp3el.add <lb$ame=H jp3el.add <txt$ame=H jp3el.add <lb3ate=H jp3el.add <txt3ate=H jp3el.add <lbBal=H jp3el.add <txtBal=H jp3el.add <btn3el=H jp3el.add <btn*ancel=H FF#estricting The 7ser Input to only $umerics in $umeric TextBoxes. txt$o.add/ey&istener <new /ey,dapter<= I public void keyTyped </ey"vent ke= I char c L ke.get/ey*har <=H if <Y<<*haracter.is3igit <c= VV <c LL /ey"vent.!/NB,*/N'(,*"==== I getToolkit<=.beep <=H ke.consume <=H K K K =H FF*hecking the ,ccunt $o. (rovided By 7ser on &ost 1ocus of the TextBox. txt$o.add1ocus&istener <new 1ocus&istener <= I public void focusGained <1ocus"vent e= I K public void focus&ost <1ocus"vent fe= I if <txt$o.getText<=.equals <JJ== I K else I rows L ;H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. find#ec <=H FF1inding if ,ccount $o. ,lready "xist or $ot.

K K K =H FF,dding (anel to 2indow. get*ontent(ane<=.add <jp3el=H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. FFIn the "nd 'howing the $ew ,ccount 2indow. set!isible <true=H K FF1unction use By Buttons of 2indow to (erform ,ction as 7ser *lick Them. public void action(erformed <,ction"vent ae= I bject obj L ae.get'ource<=H if <obj LL btn3el= I if <txt$o.getText<=.equals<JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide Id of *ustomer.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt$o.request1ocus<=H K else I deletion <=H FF*onfirm 3eletion of *urrent #ecord. K K if <obj LL btn*ancel= I txt*lear <=H set!isible <false=H dispose<=H K K FF1unction use to load all #ecords from 1ile when ,pplication "xecute. void populate,rray <= I try I fis L new 1ileInput'tream <JBank.datJ=H dis L new 3ataInput'tream <fis=H FF&oop to (opulate the ,rray.

while <true= I for <int i L ;H i T >H iMM= I recordsProwsQPiQ L dis.read7T1 <=H K rowsMMH K K catch <"xception ex= I total L rowsH if <total LL ;= I 4 ption(ane.show%essage3ialog <null- J#ecords 1ile is "mpty.Wn"nter #ecords 1irst to 3isplay.JJBank'ystem R "mpty1ileJ- 4 ption(ane.(&,I$N%"'',G"=H btn"nable <=H K else I try I dis.close<=H fis.close<=H K catch <"xception exp= I K K K K FF1unction use to 1ind #ecord by %atching the *ontents of #ecords ,rray with I3 TextBox. void find#ec <= I boolean found L falseH for <int x L ;H x T totalH xMM= I if <recordsPxQP;Q.equals <txt$o.getText<=== I found L trueH show#ec <x=H breakH K K if <found LL false= I 'tring str L txt$o.getText <=H txt*lear <=H

4 ption(ane.show%essage3ialog <this- J,ccount $o. J M str M J doesnOt "xist.JJBank'ystem R 2rong$oJ- 4 ption(ane.(&,I$N%"'',G"=H K K FF1unction which display #ecord from ,rray onto the 1orm. void show#ec <int int#ec= I txt$o.setText <recordsPint#ecQP;Q=H txt$ame.setText <recordsPint#ecQP5Q=H txt3ate.setText <recordsPint#ecQP:Q M J- J M recordsPint#ecQP6Q M J- J M recordsPint#ecQP@Q=H txtBal.setText <recordsPint#ecQP?Q=H rec*ount L int#ecH K FF*onfirming the 3eletion 3ecision made By 7ser of (rogram. void deletion <= I try I FF'how a *onfirmation 3ialog. int reply L 4 ption(ane.show*onfirm3ialog <thisJ,re you 'ure you want to 3eleteWnJ M txt$ame.getText <= M J #ecord 1rom Bank'ystemSJJBank 'ystem R 3eleteJ- 4 ption(ane.)"'N$ N (TI $4 ption(ane.(&,I$N%"'',G"=H FF*heck the 7ser 'election. if <reply LL 4 ption(ane.)"'N (TI $= I del#ec <=H FF3elete the 'elected *ontents of ,rray. K else if <reply LL 4 ption(ane.$ N (TI $= I K K catch <"xception e= IK K FF1unction use to 3elete an "lement from the ,rray. void del#ec <= I try I if <records YL null= I for<int i L rec*ountH i T totalH iMM= I for <int r L ;H r T >H rMM= I recordsPiQPrQ L recordsPiM5QPrQH

if <recordsPiQPrQ LL null= breakH K K total L total R 5H delete1ile <=H K K catch <,rrayIndex ut fBounds"xception ex= I K K FF1unction use to 'ave #ecords to 1ile ,fter 3eleting the #ecord of 7ser *hoice. void delete1ile <= I try I 1ile utput'tream fos L new 1ile utput'tream <JBank.datJ=H 3ata utput'tream dos L new 3ata utput'tream <fos=H if <records YL null= I for <int i L ;H i T totalH iMM= I for <int r L ;H r T >H rMM= I dos.write7T1 <recordsPiQPrQ=H if <recordsPiQPrQ LL null= breakH K K 4 ption(ane.show%essage3ialog <this- J#ecord has been 3eleted 'uccessfuly.JJBank'ystem R #ecord 3eletedJ- 4 ption(ane.(&,I$N%"'',G"=H txt*lear <=H K else I K dos.close<=H fos.close<=H K catch <I "xception ioe= I 4 ption(ane.show%essage3ialog <this- JThere are 'ome (roblem with 1ileJJBank'ystem R (roblemJ- 4 ption(ane.(&,I$N%"'',G"=H K K FF1unction use to *lear all Text1ields of 2indow. void txt*lear <= I

txt$o.setText <JJ=H txt$ame.setText <JJ=H txt3ate.setText <JJ=H txtBal.setText <JJ=H txt$o.request1ocus <=H K FF1unction use to &ock *ontrols of 2indow. void btn"nable <= I txt$o.set"nabled <false=H btn3el.set"nabled <false=H K K

import java.awt.GH import java.awt.event.GH

import javax.swing.GH import java.io.GH public class 3eposit%oney extends 4Internal1rame implements ,ction&istener I private 4(anel jp3ep L new 4(anel<=H private 4&abel lb$o- lb$ame- lb3ate- lb3epositH private 4Text1ield txt$o- txt$ame- txt3epositH private 4*omboBox cbo%onth- cbo3ay- cbo)earH private 4Button btn'ave- btn*ancelH private int rec*ount L ;H private int rows L ;H private int total L ;H private int currH private int depositH FF'tring Type ,rray use to &oad #ecords 1rom 1ile. private 'tring recordsPQPQ L new 'tring P?;;QP>QH private 1ileInput'tream fisH private 3ataInput'tream disH 3eposit%oney <= I FF super<Title- #esi8able- *losable- %aximi8able- Iconifiable= super <J3eposit %oneyJ- false- true- false- true=H set'i8e <66?- :6?=H jp3ep.set&ayout <null=H lb$o L new 4&abel <J,ccount $oAJ=H lb$o.set1oreground <*olor.black=H lb$o.setBounds <5?- :;- D;- :?=H lb$ame L new 4&abel <J(erson $ameAJ=H lb$ame.set1oreground <*olor.black=H lb$ame.setBounds <5?- ??- D;- :?=H lb3ate L new 4&abel <J3eposit 3ateAJ=H lb3ate.set1oreground <*olor.black=H lb3ate.setBounds <5?- E;- D;- :?=H lb3eposit L new 4&abel <J3ep. ,mountAJ=H lb3eposit.set1oreground <*olor.black=H lb3eposit.setBounds <5?- 5:?- D;- :?=H txt$o L new 4Text1ield <=H txt$o.set+ori8ontal,lignment <4Text1ield.#IG+T=H txt$o.setBounds <5;?- :;- :;?- :?=H

txt$ame L new 4Text1ield <=H txt$ame.set"nabled <false=H txt$ame.setBounds <5;?- ??- :;?- :?=H txt3eposit L new 4Text1ield <=H txt3eposit.set+ori8ontal,lignment <4Text1ield.#IG+T=H txt3eposit.setBounds <5;?- 5:?- :;?- :?=H FF*reating 3ate ption. 'tring %onthsPQ L IJ4anuaryJ- J1ebruaryJ- J%archJ- J,prilJ- J%ayJJ4uneJJ4ulyJ- J,ugustJ- J'eptemberJ- J ctoberJ- J$ovemberJ- J3ecemberJKH cbo%onth L new 4*omboBox <%onths=H cbo3ay L new 4*omboBox <=H cbo)ear L new 4*omboBox <=H for <int i L 5H i TL 65H iMM= I 'tring days L JJ M iH cbo3ay.addItem <days=H K for <int i L :;;;H i TL :;5?H iMM= I 'tring years L JJ M iH cbo)ear.addItem <years=H K FF,ligning The 3ate ption *ontrols. cbo%onth.setBounds <5;?- E;- E:- :?=H cbo3ay.setBounds <:;:- E;- @6- :?=H cbo)ear.setBounds <:?;- E;- >;- :?=H FF,ligning The Buttons. btn'ave L new 4Button <J'aveJ=H btn'ave.setBounds <:;- 5>?- 5:;- :?=H btn'ave.add,ction&istener <this=H btn*ancel L new 4Button <J*ancelJ=H btn*ancel.setBounds <5D?- 5>?- 5:;- :?=H btn*ancel.add,ction&istener <this=H FF#estricting The 7ser Input to only $umerics in $umeric TextBoxes. txt$o.add/ey&istener <new /ey,dapter<= I public void keyTyped </ey"vent ke= I char c L ke.get/ey*har <=H if <Y<<*haracter.is3igit <c= VV <c LL /ey"vent.!/NB,*/N'(,*"==== I getToolkit<=.beep <=H ke.consume <=H

K K K =H txt3eposit.add/ey&istener <new /ey,dapter<= I public void keyTyped </ey"vent ke= I char c L ke.get/ey*har <=H if <Y<<*haracter.is3igit <c= VV <c LL /ey"vent.!/NB,*/N'(,*"==== I getToolkit<=.beep <=H ke.consume <=H K K K =H FF*hecking the ,ccunt $o. (rovided By 7ser on &ost 1ocus of the TextBox. txt$o.add1ocus&istener <new 1ocus&istener <= I public void focusGained <1ocus"vent e= I K public void focus&ost <1ocus"vent fe= I if <txt$o.getText<=.equals <JJ== I K else I rows L ;H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. find#ec <=H FF1inding if ,ccount $o. ,lready "xist or $ot. K K K =H FF,dding the ,ll the *ontrols to (anel. jp3ep.add <lb$o=H jp3ep.add <txt$o=H jp3ep.add <lb$ame=H jp3ep.add <txt$ame=H jp3ep.add <lb3ate= jp3ep.add <cbo%onth=H jp3ep.add <cbo3ay=H jp3ep.add <cbo)ear=H

jp3ep.add <lb3eposit=H jp3ep.add <txt3eposit=H jp3ep.add <btn'ave=H jp3ep.add <btn*ancel=H FF,dding (anel to 2indow. get*ontent(ane<=.add <jp3ep=H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. FFIn the "nd 'howing the $ew ,ccount 2indow. set!isible <true=H K FF1unction use By Buttons of 2indow to (erform ,ction as 7ser *lick Them. public void action(erformed <,ction"vent ae= I bject obj L ae.get'ource<=H if <obj LL btn'ave= I if <txt$o.getText<=.equals<JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide Id of *ustomer.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt$o.request1ocus<=H K else if <txt3eposit.getText<=.equals<JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide 3eposit ,mount.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt3eposit.request1ocus <=H K else I edit#ec <=H FF7pdate the *ontents of ,rray. K K if <obj LL btn*ancel= I txt*lear <=H set!isible <false=H dispose<=H K K FF1unction use to load all #ecords from 1ile when ,pplication "xecute.

void populate,rray <= I try I fis L new 1ileInput'tream <JBank.datJ=H dis L new 3ataInput'tream <fis=H FF&oop to (opulate the ,rray. while <true= I for <int i L ;H i T >H iMM= I recordsProwsQPiQ L dis.read7T1 <=H K rowsMMH K K catch <"xception ex= I total L rowsH if <total LL ;= I 4 ption(ane.show%essage3ialog <null- J#ecords 1ile is "mpty.Wn"nter #ecords 1irst to 3isplay.JJBank'ystem R "mpty1ileJ- 4 ption(ane.(&,I$N%"'',G"=H btn"nable <=H K else I try I dis.close<=H fis.close<=H K catch <"xception exp= I K K K K FF1unction use to 1ind #ecord by %atching the *ontents of #ecords ,rray with I3 TextBox. void find#ec <= I boolean found L falseH for <int x L ;H x T totalH xMM= I if <recordsPxQP;Q.equals <txt$o.getText<=== I found L trueH show#ec <x=H breakH K

K if <found LL false= I 'tring str L txt$o.getText <=H txt*lear <=H 4 ption(ane.show%essage3ialog <this- J,ccount $o. J M str M J doesnOt "xist.JJBank'ystem R 2rong$oJ- 4 ption(ane.(&,I$N%"'',G"=H K K FF1unction which display #ecord from ,rray onto the 1orm. public void show#ec <int int#ec= I txt$o.setText <recordsPint#ecQP;Q=H txt$ame.setText <recordsPint#ecQP5Q=H curr L Integer.parseInt <recordsPint#ecQP?Q=H rec*ount L int#ecH K FF1unction use to *lear all Text1ields of 2indow. void txt*lear <= I txt$o.setText <JJ=H txt$ame.setText <JJ=H txt3eposit.setText <JJ=H txt$o.request1ocus <=H K FF1unction use to "dit an "lementOs !alue of the ,rray. public void edit#ec <= I deposit L Integer.parseInt <txt3eposit.getText <==H recordsPrec*ountQP;Q L txt$o.getText <=H recordsPrec*ountQP5Q L txt$ame.getText <=H recordsPrec*ountQP:Q L JJ M cbo%onth.get'electedItem <=H recordsPrec*ountQP6Q L JJ M cbo3ay.get'electedItem <=H recordsPrec*ountQP@Q L JJ M cbo)ear.get'electedItem <=H recordsPrec*ountQP?Q L JJ M <curr M deposit=H edit1ile <=H FF'ave This ,rray to 1ile. K FF1unction use to 'ave #ecords to 1ile ,fter editing the #ecord of 7ser *hoice. public void edit1ile <= I try I

1ile utput'tream fos L new 1ile utput'tream <JBank.datJ=H 3ata utput'tream dos L new 3ata utput'tream <fos=H if <records YL null= I for <int i L ;H i T totalH iMM= I for <int c L ;H c T >H cMM= I dos.write7T1 <recordsPiQPcQ=H if <recordsPiQPcQ LL null= breakH K 4 ption(ane.show%essage3ialog <this- JThe 1ile is 7pdated 'uccessfullyJJBank'ystem R #ecord 'avedJ- 4 ption(ane.(&,I$N%"'',G"=H txt*lear <=H dos.close<=H fos.close<=H K K catch <I "xception ioe= I 4 ption(ane.show%essage3ialog <this- JThere are 'ome (roblem with 1ileJJBank'ystem R (roblemJ- 4 ption(ane.(&,I$N%"'',G"=H K K FF1unction use to &ock all Buttons of 2indow. void btn"nable <= I txt$o.set"nabled <false=H cbo%onth.set"nabled <false=H cbo3ay.set"nabled <false=H cbo)ear.set"nabled <false=H txt3eposit.set"nabled <false=H btn'ave.set"nabled <false=H K K

import java.awt.GH import java.awt.event.GH import javax.swing.GH import java.io.GH public class 1ind,ccount extends 4Internal1rame implements ,ction&istener I private 4(anel jp1ind L new 4(anel<=H private 4&abel lb$olb$ame- lb3ate- lbBalH private 4Text1ield txt$o- txt$ame- txt3ate- txtBalH private 4Button btn1ind- btn*ancelH private int count L ;H private int rows L ;H private int total L ;H FF'tring Type ,rray use to &oad #ecords 1rom 1ile. private 'tring recordsPQPQ L new 'tring P?;;QP>QH private 1ileInput'tream fisH private 3ataInput'tream disH 1ind,ccount <= I FFsuper<Title- #esi8able- *losable- %aximi8able- Iconifiable= super <J'earch *ustomer PBy $o.QJ- false- true- false- true=H set'i8e <6?;- :6?=H jp1ind.set&ayout <null=H lb$o L new 4&abel <J,ccount $oAJ=H lb$o.set1oreground <*olor.black=H lb$o.setBounds <5?- :;- D;- :?=H lb$ame L new 4&abel <J(erson $ameAJ=H lb$ame.set1oreground <*olor.black=H lb$ame.setBounds <5?- ??- D;- :?=H

lb3ate L new 4&abel <J&ast TransactionAJ=H lb3ate.set1oreground <*olor.black=H lb3ate.setBounds <5?- E;- 5;;- :?=H lbBal L new 4&abel <JBalanceAJ=H lbBal.set1oreground <*olor.black=H lbBal.setBounds <5?- 5:?- D;- :?=H txt$o L new 4Text1ield <=H txt$o.set+ori8ontal,lignment <4Text1ield.#IG+T=H txt$o.setBounds <5:?- :;- :;;- :?=H txt$ame L new 4Text1ield <=H txt$ame.set"nabled <false=H txt$ame.setBounds <5:?- ??- :;;- :?=H txt3ate L new 4Text1ield <=H txt3ate.set"nabled <false=H txt3ate.setBounds <5:?- E;- :;;- :?=H txtBal L new 4Text1ield <=H txtBal.set+ori8ontal,lignment <4Text1ield.#IG+T=H txtBal.set"nabled <false=H txtBal.setBounds <5:?- 5:?- :;;- :?=H FF#estricting The 7ser Input to only $umerics. txt$o.add/ey&istener <new /ey,dapter<= I public void keyTyped </ey"vent ke= I char c L ke.get/ey*har <=H if <Y<<*haracter.is3igit <c= VV <c LL /ey"vent.!/NB,*/N'(,*"==== I getToolkit<=.beep <=H ke.consume <=H K K K =H FF,ligning The Buttons. btn1ind L new 4Button <J'earchJ=H btn1ind.setBounds <:;- 5>?- 5:;- :?=H btn1ind.add,ction&istener <this=H btn*ancel L new 4Button <J*ancelJ=H btn*ancel.setBounds <:;;- 5>?- 5:;- :?=H btn*ancel.add,ction&istener <this=H FF,dding the ,ll the *ontrols to (anel. jp1ind.add <lb$o=H

jp1ind.add <txt$o=H jp1ind.add <lb$ame=H jp1ind.add <txt$ame=H jp1ind.add <lb3ate=H jp1ind.add <txt3ate=H jp1ind.add <lbBal=H jp1ind.add <txtBal=H jp1ind.add <btn1ind=H jp1ind.add <btn*ancel=H FF,dding (anel to 2indow. get*ontent(ane<=.add <jp1ind=H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. FFIn the "nd 'howing the $ew ,ccount 2indow. set!isible <true=H K FF1unction use By Buttons of 2indow to (erform ,ction as 7ser *lick Them. public void action(erformed <,ction"vent ae= I bject obj L ae.get'ource<=H if <obj LL btn1ind= I if <txt$o.getText<=.equals<JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide Id of *ustomer to 'earch.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt$o.request1ocus<=H K else I rows L ;H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. find#ec <=H FF1inding if ,ccount $o. "xist or $ot. K K if <obj LL btn*ancel= I txt*lear <=H set!isible <false=H dispose<=H

K K FF1unction use to load all #ecords from 1ile when ,pplication "xecute. void populate,rray <= I try I fis L new 1ileInput'tream <JBank.datJ=H dis L new 3ataInput'tream <fis=H FF&oop to (opulate the ,rray. while <true= I for <int i L ;H i T >H iMM= I recordsProwsQPiQ L dis.read7T1 <=H K rowsMMH K K catch <"xception ex= I total L rowsH if <total LL ;= I 4 ption(ane.show%essage3ialog <null- J#ecords 1ile is "mpty.Wn"nter #ecords 1irst to 3isplay.JJBank'ystem R "mpty1ileJ- 4 ption(ane.(&,I$N%"'',G"=H btn"nable <=H K else I try I dis.close<=H fis.close<=H K catch <"xception exp= I K K K K FF1unction use to 1ind #ecord by %atching the *ontents of #ecords ,rray with I3 TextBox. void find#ec <= I boolean found L falseH for <int x L ;H x T totalH xMM= I if <recordsPxQP;Q.equals <txt$o.getText<=== I found L trueH

show#ec <x=H breakH K if <found LL false= I 4 ption(ane.show%essage3ialog <this- J,ccount $o. J M txt$o.getText <= M J doesnOt "xist.JJBank'ystem R 2rong$oJ- 4 ption(ane.(&,I$N%"'',G"=H txt*lear <=H K K FF1unction which display #ecord from ,rray onto the 1orm. public void show#ec <int int#ec= I txt$o.setText <recordsPint#ecQP;Q=H txt$ame.setText <recordsPint#ecQP5Q=H txt3ate.setText <recordsPint#ecQP:Q M J- J M recordsPint#ecQP6Q M J- J M recordsPint#ecQP@Q=H txtBal.setText <recordsPint#ecQP?Q=H K FF1unction use to *lear all Text1ields of 2indow. void txt*lear <= I txt$o.setText <JJ=H txt$ame.setText <JJ=H txt3ate.setText <JJ=H txtBal.setText <JJ=H txt$o.request1ocus <=H K FF1unction use to &ock *ontrols of 2indow. void btn"nable <= I txt$o.set"nabled <false=H btn1ind.set"nabled <false=H K K

import java.awt.GH import java.awt.event.GH import javax.swing.GH import java.io.GH public class 1ind,ccount$ame extends 4Internal1rame implements ,ction&istener I private 4(anel jp1ind L new 4(anel<=H private 4&abel lb$o- lb$ame- lb3ate- lbBalH private 4Text1ield txt$o- txt$ame- txt3ate- txtBalH private 4Button btn1ind- btn*ancelH private int count L ;H private int rows L ;H private int total L ;H FF'tring Type ,rray use to &oad #ecords 1rom 1ile. private 'tring recordsPQPQ L new 'tring P?;;QP>QH private 1ileInput'tream fisH private 3ataInput'tream disH 1ind,ccount$ame <= I FF super<Title- #esi8able- *losable- %aximi8able- Iconifiable= super <J'earch ,ccount +olderJ- false- true- false- true=H set'i8e <6?;- :6?=H jp1ind.set&ayout <null=H lb$o L new 4&abel <J,ccount $oAJ=H

lb$o.set1oreground <*olor.black=H lb$o.setBounds <5?- :;- D;- :?=H lb$ame L new 4&abel <J(erson $ameAJ=H lb$ame.set1oreground <*olor.black=H lb$ame.setBounds <5?- ??- D;- :?=H lb3ate L new 4&abel <J&ast TransactionAJ=H lb3ate.set1oreground <*olor.black=H lb3ate.setBounds <5?- E;- 5;;- :?=H lbBal L new 4&abel <JBalanceAJ=H lbBal.set1oreground <*olor.black=H lbBal.setBounds <5?- 5:?- D;- :?=H txt$o L new 4Text1ield <=H txt$o.set"nabled <false=H txt$o.set+ori8ontal,lignment <4Text1ield.#IG+T=H txt$o.setBounds <5:?- :;- :;;- :?=H txt$ame L new 4Text1ield <=H txt$ame.setBounds <5:?- ??- :;;- :?=H txt3ate L new 4Text1ield <=H txt3ate.set"nabled <false=H txt3ate.setBounds <5:?- E;- :;;- :?=H txtBal L new 4Text1ield <=H txtBal.set+ori8ontal,lignment <4Text1ield.#IG+T=H txtBal.set"nabled <false=H txtBal.setBounds <5:?- 5:?- :;;- :?=H FF,ligning The Buttons. btn1ind L new 4Button <J'earchJ=H btn1ind.setBounds <:;- 5>?- 5:;- :?=H btn1ind.add,ction&istener <this=H btn*ancel L new 4Button <J*ancelJ=H btn*ancel.setBounds <:;;- 5>?- 5:;- :?=H btn*ancel.add,ction&istener <this=H FF,dding the ,ll the *ontrols to (anel. jp1ind.add <lb$o=H jp1ind.add <txt$o=H jp1ind.add <lb$ame=H jp1ind.add <txt$ame=H jp1ind.add <lb3ate=H jp1ind.add <txt3ate=H jp1ind.add <lbBal=H

jp1ind.add <txtBal=H jp1ind.add <btn1ind=H jp1ind.add <btn*ancel=H FF,dding (anel to 2indow. get*ontent(ane<=.add <jp1ind=H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. FFIn the "nd 'howing the $ew ,ccount 2indow. set!isible <true=H K FF1unction use By Buttons of 2indow to (erform ,ction as 7ser *lick Them. public void action(erformed <,ction"vent ae= I bject obj L ae.get'ource<=H if <obj LL btn1ind= I if <txt$ame.getText<=.equals<JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide $ame of *ustomer to 'earch.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt$ame.request1ocus<=H K else I rows L ;H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. find#ec <=H FF1inding if ,ccount $o. "xist or $ot. K K if <obj LL btn*ancel= I txt*lear <=H set!isible <false=H dispose<=H K K FF1unction use to load all #ecords from 1ile when ,pplication "xecute. void populate,rray <= I try I fis L new 1ileInput'tream <JBank.datJ=H

dis L new 3ataInput'tream <fis=H FF&oop to (opulate the ,rray. while <true= I for <int i L ;H i T >H iMM= I recordsProwsQPiQ L dis.read7T1 <=H K rowsMMH K K catch <"xception ex= I total L rowsH if <total LL ;= I 4 ption(ane.show%essage3ialog <null- J#ecords 1ile is "mpty.Wn"nter #ecords 1irst to 3isplay.JJBank'ystem R "mpty1ileJ- 4 ption(ane.(&,I$N%"'',G"=H btn"nable <=H K else I try I dis.close<=H fis.close<=H K catch <"xception exp= I K K K K FF1unction use to 1ind #ecord by %atching the *ontents of #ecords ,rray with I3 TextBox. void find#ec <= I boolean found L falseH for <int x L ;H x T totalH xMM= I if <recordsPxQP5Q.equalsIgnore*ase <txt$ame.getText<=== I found L trueH show#ec <x=H breakH K K if <found LL false= I

4 ption(ane.show%essage3ialog <this- J*ustomer $ame J M txt$ame.getText <= M J doesnOt "xist.JJBank'ystem R 2rong$oJ- 4 ption(ane.(&,I$N%"'',G"=H txt*lear <=H K K FF1unction which display #ecord from ,rray onto the 1orm. public void show#ec <int int#ec= I txt$o.setText <recordsPint#ecQP;Q=H txt$ame.setText <recordsPint#ecQP5Q=H txt3ate.setText <recordsPint#ecQP:Q M J- J M recordsPint#ecQP6Q M J- J M recordsPint#ecQP@Q=H txtBal.setText <recordsPint#ecQP?Q=H K FF1unction use to *lear all Text1ields of 2indow. void txt*lear <= I txt$o.setText <JJ=H txt$ame.setText <JJ=H txt3ate.setText <JJ=H txtBal.setText <JJ=H txt$ame.request1ocus <=H K FF1unction use to &ock *ontrols of 2indow. void btn"nable <= I txt$ame.set"nabled <false=H btn1ind.set"nabled <false=H K K

import java.awt.GH import java.awt.event.GH import javax.swing.GH import java.io.GH public class 1ind$ame extends 4Internal1rame implements ,ction&istener I private 4(anel jp1ind L new 4(anel<=H private 4&abel lb$o- lb$ame- lb3ate- lbBalH private 4Text1ield txt$o- txt$ame- txt3ate- txtBalH private 4Button btn1ind- btn*ancelH private int count L ;H private int rows L ;H private int total L ;H FF'tring Type ,rray use to &oad #ecords 1rom 1ile. private 'tring recordsPQPQ L new 'tring P?;;QP>QH private 1ileInput'tream fisH private 3ataInput'tream disH 1ind$ame <= I

FFsuper<Title- #esi8able- *losable- %aximi8able- Iconifiable= super <J'earch *ustomer PBy $ameQJ- false- true- false- true=H set'i8e <6?;- :6?=H jp1ind.set&ayout <null=H lb$o L new 4&abel <J,ccount $oAJ=H lb$o.set1oreground <*olor.black=H lb$o.setBounds <5?- :;- D;- :?=H lb$ame L new 4&abel <J(erson $ameAJ=H lb$ame.set1oreground <*olor.black=H lb$ame.setBounds <5?- ??- D;- :?=H lb3ate L new 4&abel <J&ast TransactionAJ=H lb3ate.set1oreground <*olor.black=H lb3ate.setBounds <5?- E;- 5;;- :?=H lbBal L new 4&abel <JBalanceAJ=H lbBal.set1oreground <*olor.black=H lbBal.setBounds <5?- 5:?- D;- :?=H txt$o L new 4Text1ield <=H txt$o.set+ori8ontal,lignment <4Text1ield.#IG+T=H txt$o.set"nabled <false=H txt$o.setBounds <5:?- :;- :;;- :?=H txt$ame L new 4Text1ield <=H txt$ame.setBounds <5:?- ??- :;;- :?=H txt3ate L new 4Text1ield <=H txt3ate.set"nabled <false=H txt3ate.setBounds <5:?- E;- :;;- :?=H txtBal L new 4Text1ield <=H txtBal.set+ori8ontal,lignment <4Text1ield.#IG+T=H txtBal.set"nabled <false=H txtBal.setBounds <5:?- 5:?- :;;- :?=H FF,ligning The Buttons. btn1ind L new 4Button <J'earchJ=H btn1ind.setBounds <:;- 5>?- 5:;- :?=H btn1ind.add,ction&istener <this=H btn*ancel L new 4Button <J*ancelJ=H btn*ancel.setBounds <:;;- 5>?- 5:;- :?=H btn*ancel.add,ction&istener <this=H FF,dding the ,ll the *ontrols to (anel. jp1ind.add <lb$o=H jp1ind.add <txt$o=H

jp1ind.add <lb$ame=H jp1ind.add <txt$ame=H jp1ind.add <lb3ate=H jp1ind.add <txt3ate=H jp1ind.add <lbBal=H jp1ind.add <txtBal=H jp1ind.add <btn1ind=H jp1ind.add <btn*ancel=H FF,dding (anel to 2indow. get*ontent(ane<=.add <jp1ind=H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. FFIn the "nd 'howing the $ew ,ccount 2indow. set!isible <true=H K FF1unction use By Buttons of 2indow to (erform ,ction as 7ser *lick Them. public void action(erformed <,ction"vent ae= I bject obj L ae.get'ource<=H if <obj LL btn1ind= I if <txt$ame.getText<=.equals <JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide $ame of *ustomer to 'earch.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt$ame.request1ocus<=H K else I rows L ;H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. find#ec <=H FF1inding if ,ccount $o. "xist or $ot. K K if <obj LL btn*ancel= I txt*lear <=H set!isible <false=H dispose<=H K

K FF1unction use to load all #ecords from 1ile when ,pplication "xecute. void populate,rray <= I try I fis L new 1ileInput'tream <JBank.datJ=H dis L new 3ataInput'tream <fis=H FF&oop to (opulate the ,rray. while <true= I for <int i L ;H i T >H iMM= I recordsProwsQPiQ L dis.read7T1 <=H K rowsMMH K K catch <"xception ex= I total L rowsH if <total LL ;= I 4 ption(ane.show%essage3ialog <null- J#ecords 1ile is "mpty.Wn"nter #ecords 1irst to 3isplay.JJBank'ystem R "mpty1ileJ- 4 ption(ane.(&,I$N%"'',G"=H btn"nable <=H K else I try I dis.close<=H fis.close<=H K catch <"xception exp= I K K K K FF1unction use to 1ind #ecord by %atching the *ontents of #ecords ,rray with I3 TextBox. void find#ec <= I boolean found L falseH for <int x L ;H x T totalH xMM= I if <recordsPxQP5Q.equalsIgnore*ase <txt$ame.getText<=== I found L trueH show#ec <x=H

breakH K K if <found LL false= I 4 ption(ane.show%essage3ialog <this- J*ustomer J M txt$ame.getText <= M J doesnOt "xist.JJBank'ystem R 2rong$oJ- 4 ption(ane.(&,I$N%"'',G"=H txt*lear <=H K K FF1unction which display #ecord from ,rray onto the 1orm. public void show#ec <int int#ec= I txt$o.setText <recordsPint#ecQP;Q=H txt$ame.setText <recordsPint#ecQP5Q=H txt3ate.setText <recordsPint#ecQP:Q M J- J M recordsPint#ecQP6Q M J- J M recordsPint#ecQP@Q=H txtBal.setText <recordsPint#ecQP?Q=H K FF1unction use to *lear all Text1ields of 2indow. void txt*lear <= I txt$o.setText <JJ=H txt$ame.setText <JJ=H txt3ate.setText <JJ=H txtBal.setText <JJ=H txt$ame.request1ocus <=H K FF1unction use to &ock *ontrols of 2indow. void btn"nable <= I txt$ame.set"nabled <false=H btn1ind.set"nabled <false=H K K

import javax.swing.plaf.GH import javax.swing.plaf.metal.GH import javax.swing.GH import javax.swing.border.GH import java.awt.GH public class GrayTheme extends 3efault%etalTheme I public 'tring get$ame<= I return J*ool GrayJH K FF greenish colors

private final *olor7I#esource primary5 L new *olor7I#esource<::?- ::?::?=H private final *olor7I#esource primary: L new *olor7I#esource<5>?- 5>?5>?=H private final *olor7I#esource primary6 L new *olor7I#esource<5C?- 5C?5C?=H protected *olor7I#esource get(rimary5<= I return primary5H K protected *olor7I#esource get(rimary:<= I return primary:H K protected *olor7I#esource get(rimary6<= I return primary6H K K

import javax.swing.plaf.GH import javax.swing.plaf.metal.GH import javax.swing.GH import javax.swing.border.GH import java.awt.GH public class GreenTheme extends 3efault%etalTheme I public 'tring get$ame<= I return JGreenishJH K

private final *olor7I#esource primary5 L new *olor7I#esource<?5- 5;:?5=H private final *olor7I#esource primary: L new *olor7I#esource<5;:- 5?65;:=H private final *olor7I#esource primary6 L new *olor7I#esource<5?6- :;@5?6=H private final *olor7I#esource secondary: L new *olor7I#esource<:;@:;@- :;@=H private final *olor7I#esource secondary6 L new *olor7I#esource<5?;:;;- 5?;=H protected *olor7I#esource get(rimary5<= I return primary5H K protected *olor7I#esource get(rimary:<= I return primary:H K protected *olor7I#esource get(rimary6<= I return primary6H K protected *olor7I#esource get'econdary:<= I return secondary:H K protected *olor7I#esource get'econdary6<= I return secondary6H K K

import javax.swing.plaf.metal.GH import javax.swing.GH import javax.swing.border.GH import java.awt.GH import java.awt.event.GH public class %etalTheme%enu extends 4%enu implements ,ction&istener I %etalThemePQ themesH

public %etalTheme%enu <'tring name- %etalThemePQ theme,rray= I super<name=H themes L theme,rrayH ButtonGroup group L new ButtonGroup<=H for <int i L ;H i T themes.lengthH iMM= I 4#adioButton%enuItem item L new 4#adioButton%enuItem<themesPiQ.get$ame<==H group.add<item=H add<item=H item.set,ction*ommand <iMJJ=H item.add,ction&istener <this=H if < i LL ;= item.set'elected<true=H K K public void action(erformed<,ction"vent e= I 'tring num'tr L e.get,ction*ommand<=H %etalTheme selectedTheme L themes P Integer.parseInt <num'tr= QH %etal&ook,nd1eel.set*urrentTheme <selectedTheme=H try I 7I%anager.set&ook,nd1eel <Jjavax.swing.plaf.metal.%etal&ook,nd1eelJ=H K catch <"xception ex= I 'ystem.out.println<J1ailed loading %etalJ=H 'ystem.out.println<ex=H K K K

import javax.swing.plaf.GH import javax.swing.plaf.metal.GH import javax.swing.GH import javax.swing.border.GH import java.awt.GH

public class %ilkyTheme extends 3efault%etalTheme I public 'tring get$ame <= I return J2orthable %ilkyJH K private final *olor7I#esource primary5 L new *olor7I#esource<;- ;- ;=H private final *olor7I#esource primary: L new *olor7I#esource<:6?- :6?:6?=H private final *olor7I#esource primary6 L new *olor7I#esource<:?;- :?;:?;=H private final *olor7I#esource secondary: L new *olor7I#esource<:;@:;@- :;@=H private final *olor7I#esource secondary6 L new *olor7I#esource<:?;:?;- :?;=H protected *olor7I#esource get(rimary5<= I return primary5H K protected *olor7I#esource get(rimary:<= I return primary:H K protected *olor7I#esource get(rimary6<= I return primary6H K protected *olor7I#esource get'econdary:<= I return secondary:H K protected *olor7I#esource get'econdary6<= I return secondary6H K K

import java.awt.GH import java.awt.event.GH import javax.swing.GH import java.io.GH

public class $ew,ccount extends 4Internal1rame implements ,ction&istener I private 4(anel jpInfo L new 4(anel<=H private 4&abel lb$o- lb$ame- lb3ate- lb3epositH private 4Text1ield txt$o- txt$ame- txt3epositH private 4*omboBox cbo%onth- cbo3ay- cbo)earH private 4Button btn'ave- btn*ancelH private int count L ;H private int rows L ;H private int total L ;H FF'tring Type ,rray use to &oad #ecords 1rom 1ile. private 'tring recordsPQPQ L new 'tring P?;;QP>QH FF'tring Type ,rray use to 'ave #ecords into 1ile. private 'tring savesPQPQ L new 'tring P?;;QP>QH private 1ileInput'tream fisH private 3ataInput'tream disH $ew,ccount <= I FF super<Title- #esi8able- *losable- %aximi8able- Iconifiable= super <J*reate $ew ,ccountJ- false- true- false- true=H set'i8e <66?- :6?=H jpInfo.setBounds <;- ;- ?;;- 55?=H jpInfo.set&ayout <null=H lb$o L new 4&abel <J,ccount $oAJ=H lb$o.set1oreground <*olor.black=H lb$o.setBounds <5?- :;- D;- :?=H lb$ame L new 4&abel <J(erson $ameAJ=H lb$ame.set1oreground <*olor.black=H lb$ame.setBounds <5?- ??- D;- :?=H lb3ate L new 4&abel <J3eposit 3ateAJ=H lb3ate.set1oreground <*olor.black=H lb3ate.setBounds <5?- E;- D;- :?=H lb3eposit L new 4&abel <J3ep. ,mountAJ=H lb3eposit.set1oreground <*olor.black=H lb3eposit.setBounds <5?- 5:?- D;- :?=H txt$o L new 4Text1ield <=H txt$o.set+ori8ontal,lignment <4Text1ield.#IG+T=H txt$o.setBounds <5;?- :;- :;?- :?=H txt$ame L new 4Text1ield <=H txt$ame.setBounds <5;?- ??- :;?- :?=H

txt3eposit L new 4Text1ield <=H txt3eposit.set+ori8ontal,lignment <4Text1ield.#IG+T=H txt3eposit.setBounds <5;?- 5:?- :;?- :?=H FF#estricting The 7ser Input to only $umerics in $umeric TextBoxes. txt$o.add/ey&istener <new /ey,dapter<= I public void keyTyped </ey"vent ke= I char c L ke.get/ey*har <=H if <Y<<*haracter.is3igit <c= VV <c LL /ey"vent.!/NB,*/N'(,*"==== I getToolkit<=.beep <=H ke.consume <=H K K K =H txt3eposit.add/ey&istener <new /ey,dapter<= I public void keyTyped </ey"vent ke= I char c L ke.get/ey*har <=H if <Y<<*haracter.is3igit <c= VV <c LL /ey"vent.!/NB,*/N'(,*"==== I getToolkit<=.beep <=H ke.consume <=H K K K =H FF*reating 3ate ption. 'tring %onthsPQ L IJ4anuaryJ- J1ebruaryJ- J%archJ- J,prilJ- J%ayJJ4uneJJ4ulyJ- J,ugustJ- J'eptemberJ- J ctoberJ- J$ovemberJ- J3ecemberJKH cbo%onth L new 4*omboBox <%onths=H cbo3ay L new 4*omboBox <=H cbo)ear L new 4*omboBox <=H for <int i L 5H i TL 65H iMM= I 'tring days L JJ M iH cbo3ay.addItem <days=H K for <int i L :;;;H i TL :;5?H iMM= I 'tring years L JJ M iH cbo)ear.addItem <years=H K

FF,ligning The 3ate ption *ontrols. cbo%onth.setBounds <5;?- E;- E:- :?=H cbo3ay.setBounds <:;:- E;- @6- :?=H cbo)ear.setBounds <:?;- E;- >;- :?=H FF,ligning The Buttons. btn'ave L new 4Button <J'aveJ=H btn'ave.setBounds <:;- 5>?- 5:;- :?=H btn'ave.add,ction&istener <this=H btn*ancel L new 4Button <J*ancelJ=H btn*ancel.setBounds <5D?- 5>?- 5:;- :?=H btn*ancel.add,ction&istener <this=H FF,dding the ,ll the *ontrols to (anel. jpInfo.add <lb$o=H jpInfo.add <txt$o=H jpInfo.add <lb$ame=H jpInfo.add <txt$ame=H jpInfo.add <lb3ate=H jpInfo.add <cbo%onth=H jpInfo.add <cbo3ay=H jpInfo.add <cbo)ear=H jpInfo.add <lb3eposit=H jpInfo.add <txt3eposit=H jpInfo.add <btn'ave=H jpInfo.add <btn*ancel=H FF,dding (anel to 2indow. get*ontent(ane<=.add <jpInfo=H FFIn the "nd 'howing the $ew ,ccount 2indow. set!isible <true=H K FF1unction use By Buttons of 2indow to (erform ,ction as 7ser *lick Them. public void action(erformed <,ction"vent ae= I bject obj L ae.get'ource<=H if <obj LL btn'ave= I if <txt$o.getText<=.equals<JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide Id of *ustomer.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt$o.request1ocus<=H K

else if <txt$ame.getText<=.equals<JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide $ame of *ustomer.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt$ame.request1ocus <=H K else if <txt3eposit.getText<=.equals<JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide 3eposit ,mount.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt3eposit.request1ocus <=H K else I populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. find#ec <=H FF1inding if ,ccount $o. ,lready "xist or $ot. K K if <obj LL btn*ancel= I txt*lear <=H set!isible <false=H dispose<=H K K FF1unction use to load all #ecords from 1ile when ,pplication "xecute. void populate,rray <= I try I fis L new 1ileInput'tream <JBank.datJ=H dis L new 3ataInput'tream <fis=H FF&oop to (opulate the ,rray. while <true= I for <int i L ;H i T >H iMM= I recordsProwsQPiQ L dis.read7T1 <=H K rowsMMH K K catch <"xception ex= I

total L rowsH if <total LL ;= I K else I try I dis.close<=H fis.close<=H K catch <"xception exp= I K K K K FF1unction use to 1ind #ecord by %atching the *ontents of #ecords ,rray with I3 TextBox. void find#ec <= I boolean found L falseH for <int x L ;H x T totalH xMM= I if <recordsPxQP;Q.equals <txt$o.getText<=== I found L trueH 4 ption(ane.show%essage3ialog <this- J,ccount $o. J M txt$o.getText <= M J is ,lready "xist.JJBank'ystem R 2rong$oJ- 4 ption(ane.(&,I$N%"'',G"=H txt*lear <=H breakH K K if <found LL false= I save,rray <=H K K FF1unction use to add new "lement to ,rray. void save,rray <= I savesPcountQP;Q L txt$o.getText <=H savesPcountQP5Q L txt$ame.getText <=H savesPcountQP:Q L JJ M cbo%onth.get'electedItem <=H savesPcountQP6Q L JJ M cbo3ay.get'electedItem <=H savesPcountQP@Q L JJ M cbo)ear.get'electedItem <=H savesPcountQP?Q L txt3eposit.getText <=H save1ile <=H FF'ave This ,rray to 1ile. countMMH

K FF1unction use to 'ave new #ecord to the 1ile. void save1ile <= I try I 1ile utput'tream fos L new 1ile utput'tream <JBank.datJ- true=H 3ata utput'tream dos L new 3ata utput'tream <fos=H dos.write7T1 <savesPcountQP;Q=H dos.write7T1 <savesPcountQP5Q=H dos.write7T1 <savesPcountQP:Q=H dos.write7T1 <savesPcountQP6Q=H dos.write7T1 <savesPcountQP@Q=H dos.write7T1 <savesPcountQP?Q=H 4 ption(ane.show%essage3ialog <this- JThe #ecord has been 'aved 'uccessfullyJJBank'ystem R #ecord 'avedJ- 4 ption(ane.(&,I$N%"'',G"=H txt*lear <=H dos.close<=H fos.close<=H K catch <I "xception ioe= I 4 ption(ane.show%essage3ialog <this- JThere are 'ome (roblem with 1ileJJBank'ystem R (roblemJ- 4 ption(ane.(&,I$N%"'',G"=H K K FF1unction use to *lear all Text1ields of 2indow. void txt*lear <= I txt$o.setText <JJ=H txt$ame.setText <JJ=H txt3eposit.setText <JJ=H txt$o.request1ocus <=H K K

import javax.swing.plaf.GH import javax.swing.plaf.metal.GH import javax.swing.GH import javax.swing.border.GH import java.awt.GH import java.io.GH import java.util.GH public class (roperties%etalTheme extends 3efault%etalTheme I private 'tring name L J*ustom ThemeJH private *olor7I#esource primary5H private *olor7I#esource primary:H private *olor7I#esource primary6H private *olor7I#esource secondary5H private *olor7I#esource secondary:H private *olor7I#esource secondary6H private *olor7I#esource blackH private *olor7I#esource whiteH public (roperties%etalTheme < Input'tream stream = I init*olors<=H load(roperties<stream=H K private void init*olors<= I primary5 L super.get(rimary5<=H primary: L super.get(rimary:<=H primary6 L super.get(rimary6<=H secondary5 L super.get'econdary5<=H secondary: L super.get'econdary:<=H secondary6 L super.get'econdary6<=H black L super.getBlack<=H white L super.get2hite<=H K private void load(roperties <Input'tream stream= I (roperties prop L new (roperties<=H try I prop.load<stream=H

K catch <I "xception e= I 'ystem.out.println<e=H K bject temp$ame L prop.get<JnameJ=H if <temp$ame YL null= I name L temp$ame.to'tring<=H K bject color'tring L nullH color'tring L prop.get <Jprimary5J=H if <color'tring YL null=I primary5 L parse*olor<color'tring.to'tring<==H K color'tring L prop.get<Jprimary:J=H if <color'tring YL null= I primary: L parse*olor<color'tring.to'tring<==H K color'tring L prop.get<Jprimary6J=H if <color'tring YL null= I primary6 L parse*olor<color'tring.to'tring<==H K color'tring L prop.get<Jsecondary5J=H if <color'tring YL null= I secondary5 L parse*olor<color'tring.to'tring<==H K color'tring L prop.get<Jsecondary:J=H if <color'tring YL null= I secondary: L parse*olor<color'tring.to'tring<==H K color'tring L prop.get<Jsecondary6J=H if <color'tring YL null= I secondary6 L parse*olor<color'tring.to'tring<==H K color'tring L prop.get<JblackJ=H if <color'tring YL null= I black L parse*olor<color'tring.to'tring<==H K color'tring L prop.get<JwhiteJ=H if <color'tring YL null= I

white L parse*olor<color'tring.to'tring<==H K K public 'tring get$ame<= I return nameH K protected *olor7I#esource get(rimary5<= I return primary5H K protected *olor7I#esource get(rimary:<= I return primary:H K protected *olor7I#esource get(rimary6<= I return primary6H K protected *olor7I#esource get'econdary5<= I return secondary5H K protected *olor7I#esource get'econdary:<= I return secondary:H K protected *olor7I#esource get'econdary6<= I return secondary6H K protected *olor7I#esource getBlack<= I return blackH K protected *olor7I#esource get2hite<= I return whiteH K private *olor7I#esource parse*olor<'tring s= I int red L ;H int green L ;H int blue L ;H try I 'tringTokeni8er st L new 'tringTokeni8er<s- J-J=H red L Integer.parseInt<st.nextToken<==H green L Integer.parseInt<st.nextToken<==H blue L Integer.parseInt<st.nextToken<==H K catch <"xception e= I 'ystem.out.println<e=H 'ystem.out.println<J*ouldnOt parse color AJ M s=H K return new *olor7I#esource<red- green- blue=H K K

import javax.swing.plaf.GH import javax.swing.plaf.metal.GH import javax.swing.GH import javax.swing.border.GH import java.awt.GH public class 'andTheme extends 3efault%etalTheme I public 'tring get$ame<= I return JTrue 'andJH K private final *olor7I#esource primary5 L new *olor7I#esource< DC- DC@C=H private final *olor7I#esource primary: L new *olor7I#esource<5?E- 5?5555=H private final *olor7I#esource primary6 L new *olor7I#esource<5EE- 5D65@6=H private final *olor7I#esource secondary5 L new *olor7I#esource< 555555- 555=H private final *olor7I#esource secondary: L new *olor7I#esource<5?E5?E- 5?E=H private final *olor7I#esource secondary6 L new *olor7I#esource<:65:5?- 5D6=H protected *olor7I#esource get(rimary5<= I return primary5H K protected *olor7I#esource get(rimary:<= I return primary:H K protected *olor7I#esource get(rimary6<= I return primary6H K protected *olor7I#esource get'econdary5<= I return secondary5H K protected *olor7I#esource get'econdary:<= I return secondary:H K protected *olor7I#esource get'econdary6<= I return secondary6H K K

import javax.swing.plaf.GH import javax.swing.plaf.metal.GH import javax.swing.GH import javax.swing.border.GH import java.awt.GH public class 'olidTheme extends 3efault%etalTheme I public 'tring get$ame<= I return JInside 'olidJH K private final *olor7I#esource primary5 L new *olor7I#esource<;- ;- ;=H private final *olor7I#esource primary: L new *olor7I#esource<::;- ::;::;=H private final *olor7I#esource primary6 L new *olor7I#esource<:6;- :6;:6;=H protected *olor7I#esource get(rimary5<= I return primary5H K protected *olor7I#esource get(rimary:<= I return primary:H K protected *olor7I#esource get(rimary6<= I return primary6H K K

import java.awt.GH import javax.swing.GH import javax.swing.border.&ineBorderH public class 'plash extends 42indow I private 3imension d L Toolkit.get3efaultToolkit<=.get'creen'i8e<=H public 'plash <= I 4&abel lbImage L new 4&abel <new ImageIcon <J'plash.jpgJ==H *olor cl L new *olor <;- ;- ;=H lbImage.setBorder <new &ineBorder <cl- 5==H get*ontent(ane<=.add <lbImage- Border&ayout.*"$T"#=H pack<=H set'i8e <get'i8e<=.width- get'i8e<=.height=H set&ocation <d.width F : R get2idth<= F :- d.height F : R get+eight<= F :=H show<=H for <int i L ;H i TL 5;;;H iMM= I K new Bank'ystem <=H to1ront<=H dispose <=H set!isible <false=H K public static void main <'tring argsPQ= I new 'plash <=H K K

import java.awt.GH import javax.swing.GH import java.awt.event.GH import java.io.GH import javax.swing.table.3efaultTable%odelH public class !iew*ustomer extends 4Internal1rame I private 4(anel jp'how L new 4(anel <=H private 3efaultTable%odel dtm*ustomerH private 4Table tb*ustomerH private 4'croll(ane jspTableH private int row L ;H private int total L ;H FF'tring Type ,rray use to &oad #ecords into 1ile. private 'tring row3ataPQPQH private 1ileInput'tream fisH private 3ataInput'tream disH !iew*ustomer <= I FFsuper<Title- #esi8able- *losable- %aximi8able- Iconifiable= super <J!iew ,ll ,ccount +oldersJ- false- true- false- true=H set'i8e <@C?- :D;=H jp'how.set&ayout <null=H populate,rray <=H tb*ustomer L makeTable <=H jspTable L new 4'croll(ane <tb*ustomer=H jspTable.setBounds <:;- :;- @:?- :;;=H FF,dding the Table to (anel. jp'how.add <jspTable=H FF,dding (anel to 2indow. get*ontent(ane<=.add <jp'how=H

FFIn the "nd 'howing the $ew ,ccount 2indow. set!isible <true=H K WFF1unction use to load all #ecords from 1ile when 2indow pen. void populate,rray <= I FF'tring Type ,rray use to &oad #ecords into 1ile. 'tring rowsPQPQ L new 'tring P?;;QP>QH try I fis L new 1ileInput'tream <JBank.datJ=H dis L new 3ataInput'tream <fis=H FF&oop to (opulate the ,rray. while <true= I for <int i L ;H i T >H iMM= I rowsProwQPiQ L dis.read7T1 <=H K rowMMH K K catch <"xception ex= I total L rowH row3ata L new 'tring PtotalQP@QH if <total LL ;= I 4 ption(ane.show%essage3ialog <null- J#ecords 1ile is "mpty.Wn"nter #ecords to 3isplay.JJBank'ystem R "mpty1ileJ- 4 ption(ane.(&,I$N%"'',G"=H K else I for <int i L ;H i T totalH iMM= I row3ataPiQP;Q L rowsPiQP;QH row3ataPiQP5Q L rowsPiQP5QH row3ataPiQP:Q L rowsPiQP:Q M J- J M rowsPiQP6Q M J- J M rowsPiQP@QH row3ataPiQP6Q L rowsPiQP?QH K try I dis.close<=H fis.close<=H K catch <"xception exp= I K K

K K FF1unction to *reate the Table and ,dd 3ata to 'how. private 4Table makeTable <= I FF'tring Type ,rray use to Give Table *olumn $ames. 'tring colsPQ L IJ,ccount $o.J- J*ustomer $ameJ- J pening 3ateJ- JBank BalanceJKH dtm*ustomer L new 3efaultTable%odel <row3ata- cols=H tb*ustomer L new 4Table <dtm*ustomer= I public boolean is*ell"ditable <int i#ow- int i*ol= I return falseH FF3isable ,ll *olumns of Table. K KH FF'i8ing the *olumns of Table. <tb*ustomer.get*olumn%odel<=.get*olumn<;==.set(referred2idth <5D;=H <tb*ustomer.get*olumn%odel<=.get*olumn<5==.set(referred2idth <:C?=H <tb*ustomer.get*olumn%odel<=.get*olumn<:==.set(referred2idth <:C?=H <tb*ustomer.get*olumn%odel<=.get*olumn<6==.set(referred2idth <:;;=H tb*ustomer.set#ow+eight <:;=H tb*ustomer.set'election%ode <&ist'election%odel.'I$G&"N'"&"*TI $=H return tb*ustomerH K K

import java.awt.GH import java.awt.event.GH import javax.swing.GH import java.io.GH public class !iew ne extends 4Internal1rame implements ,ction&istener I private 4(anel jp#ec L new 4(anel<=H private 4&abel lb$o- lb$ame- lb3ate- lbBalH private 4Text1ield txt$o- txt$ame- txt3ate- txtBal- txt#ecH private 4Button btn1irst- btnBack- btn$ext- btn&astH private int rec*ount L ;H private int rows L ;H private int total L ;H FF'tring Type ,rray use to &oad #ecords 1rom 1ile. private 'tring recordsPQPQ L new 'tring P?;;QP>QH private 1ileInput'tream fisH private 3ataInput'tream disH !iew ne <= I FF super<Title- #esi8able- *losable- %aximi8able- Iconifiable= super <J!iew ,ccount +oldersJ- false- true- false- true=H set'i8e <6?;- :6?=H jp#ec.set&ayout <null=H lb$o L new 4&abel <J,ccount $oAJ=H lb$o.set1oreground <*olor.black=H lb$o.setBounds <5?- :;- D;- :?=H lb$ame L new 4&abel <J(erson $ameAJ=H lb$ame.set1oreground <*olor.black=H lb$ame.setBounds <5?- ??- D;- :?=H

lb3ate L new 4&abel <J&ast TransactionAJ=H lb3ate.set1oreground <*olor.black=H lb3ate.setBounds <5?- E;- 5;;- :?=H lbBal L new 4&abel <JBalanceAJ=H lbBal.set1oreground <*olor.black=H lbBal.setBounds <5?- 5:?- D;- :?=H txt$o L new 4Text1ield <=H txt$o.set+ori8ontal,lignment <4Text1ield.#IG+T=H txt$o.set"nabled <false=H txt$o.setBounds <5:?- :;- :;;- :?=H txt$ame L new 4Text1ield <=H txt$ame.set"nabled <false=H txt$ame.setBounds <5:?- ??- :;;- :?=H txt3ate L new 4Text1ield <=H txt3ate.set"nabled <false=H txt3ate.setBounds <5:?- E;- :;;- :?=H txtBal L new 4Text1ield <=H txtBal.set+ori8ontal,lignment <4Text1ield.#IG+T=H txtBal.set"nabled <false=H txtBal.setBounds <5:?- 5:?- :;;- :?=H FF,ligninig The $avigation Buttons. btn1irst L new 4Button <JTTJ=H btn1irst.setBounds <5?- 5>?- ?;- :?=H btn1irst.add,ction&istener <this=H btnBack L new 4Button <JTJ=H btnBack.setBounds <>?- 5>?- ?;- :?=H btnBack.add,ction&istener <this=H btn$ext L new 4Button <JZJ=H btn$ext.setBounds <::?- 5>?- ?;- :?=H btn$ext.add,ction&istener <this=H btn&ast L new 4Button <JZZJ=H btn&ast.setBounds <:C?- 5>?- ?;- :?=H btn&ast.add,ction&istener <this=H txt#ec L new 4Text1ield <=H txt#ec.set"nabled <false=H txt#ec.set+ori8ontal,lignment <4Text1ield.*"$T"#=H txt#ec.setBounds <55?- 5>?- 5;E- :?=H FF,dding the ,ll the *ontrols to (anel. jp#ec.add <lb$o=H

jp#ec.add <txt$o=H jp#ec.add <lb$ame=H jp#ec.add <txt$ame=H jp#ec.add <lb3ate=H jp#ec.add <txt3ate=H jp#ec.add <lbBal=H jp#ec.add <txtBal=H jp#ec.add <btn1irst=H jp#ec.add <btnBack=H jp#ec.add <btn$ext=H jp#ec.add <btn&ast=H jp#ec.add <txt#ec=H FF,dding (anel to 2indow. get*ontent(ane<=.add <jp#ec=H FF&oad ,ll "xisting #ecords in %emory and 3isplay them on 1orm. populate,rray <=H show#ec <;=H FFIn the "nd 'howing the $ew ,ccount 2indow. set!isible <true=H K FF1unction use By Buttons of 2indow to (erform ,ction as 7ser *lick Them. public void action(erformed <,ction"vent ae= I bject obj L ae.get'ource<=H if <obj LL btn1irst= I rec*ount L ;H show#ec <rec*ount=H K else if <obj LL btnBack= I rec*ount L rec*ount R 5H if <rec*ount T ;= I rec*ount L ;H show#ec <rec*ount=H 4 ption(ane.show%essage3ialog <this- J)ou are on 1irst #ecord.JJBank'ystem R 5st #ecordJ- 4 ption(ane.(&,I$N%"'',G"=H K else I show#ec <rec*ount=H K K

else if <obj LL btn$ext= I rec*ount L rec*ount M 5H if <rec*ount LL total= I rec*ount L total R 5H show#ec <rec*ount=H 4 ption(ane.show%essage3ialog <this- J)ou are on &ast #ecord.JJBank'ystem R "nd of #ecordsJ- 4 ption(ane.(&,I$N%"'',G"=H K else I show#ec <rec*ount=H K K else if <obj LL btn&ast= I rec*ount L total R 5H show#ec <rec*ount=H K K FF1unction use to load all #ecords from 1ile when ,pplication "xecute. void populate,rray <= I try I fis L new 1ileInput'tream <JBank.datJ=H dis L new 3ataInput'tream <fis=H FF&oop to (opulate the ,rray. while <true= I for <int i L ;H i T >H iMM= I recordsProwsQPiQ L dis.read7T1 <=H K rowsMMH K K catch <"xception ex= I total L rowsH if <total LL ;= I 4 ption(ane.show%essage3ialog <null- J#ecords 1ile is "mpty.Wn"nter #ecords 1irst to 3isplay.JJBank'ystem R "mpty1ileJ- 4 ption(ane.(&,I$N%"'',G"=H btn"nable <=H K else I

try I dis.close<=H fis.close<=H K catch <"xception exp= I K K K K FF1unction which display #ecord from ,rray onto the 1orm. public void show#ec <int int#ec= I txt$o.setText <recordsPint#ecQP;Q=H txt$ame.setText <recordsPint#ecQP5Q=H txt3ate.setText <recordsPint#ecQP:Q M J- J M recordsPint#ecQP6Q M J- J M recordsPint#ecQP@Q=H txtBal.setText <recordsPint#ecQP?Q=H if <total LL ;= I txt#ec.setText <int#ec M JFJ M total=H FF'howing #ecord $o. and Total #ecords. txt3ate.setText <JJ=H K else I txt#ec.setText <<int#ec M 5= M JFJ M total=H FF'howing #ecord $o. and Total #ecords. K K FF1unction use to &ock all Buttons of 2indow. void btn"nable <= I btn1irst.set"nabled <false=H btnBack.set"nabled <false=H btn$ext.set"nabled <false=H btn&ast.set"nabled <false=H K K

import java.awt.GH import java.awt.event.GH import javax.swing.GH import java.io.GH public class 2ithdraw%oney extends 4Internal1rame implements ,ction&istener I private 4(anel jp2ith L new 4(anel<=H private 4&abel lb$o- lb$ame- lb3ate- lb2ithdrawH private 4Text1ield txt$o- txt$ame- txt2ithdrawH private 4*omboBox cbo%onth- cbo3ay- cbo)earH private 4Button btn'ave- btn*ancelH private int rec*ount L ;H private int rows L ;H private int total L ;H private int currH private int withdrawH FF'tring Type ,rray use to &oad #ecords 1rom 1ile. private 'tring recordsPQPQ L new 'tring P?;;QP>QH private 1ileInput'tream fisH private 3ataInput'tream disH 2ithdraw%oney <= I FF super<Title- #esi8able- *losable- %aximi8able- Iconifiable=

super <J2ithdraw %oneyJ- false- true- false- true=H set'i8e <66?- :6?=H jp2ith.set&ayout <null=H lb$o L new 4&abel <J,ccount $oAJ=H lb$o.set1oreground <*olor.black=H lb$o.setBounds <5?- :;- D;- :?=H lb$ame L new 4&abel <J(erson $ameAJ=H lb$ame.set1oreground <*olor.black=H lb$ame.setBounds <5?- ??- D;- :?=H lb3ate L new 4&abel <J2ith. 3ateAJ=H lb3ate.set1oreground <*olor.black=H lb3ate.setBounds <5?- E;- D;- :?=H lb2ithdraw L new 4&abel <J2ith. ,mountAJ=H lb2ithdraw.set1oreground <*olor.black=H lb2ithdraw.setBounds <5?- 5:?- D;- :?=H txt$o L new 4Text1ield <=H txt$o.set+ori8ontal,lignment <4Text1ield.#IG+T=H FF*hecking the ,ccunt $o. (rovided By 7ser on &ost 1ocus of the TextBox. txt$o.add1ocus&istener <new 1ocus&istener <= I public void focusGained <1ocus"vent e= I K public void focus&ost <1ocus"vent fe= I if <txt$o.getText<=.equals <JJ== I K else I rows L ;H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. find#ec <=H FF1inding if ,ccount $o. ,lready "xist or $ot. K K K =H txt$o.setBounds <5;?- :;- :;?- :?=H txt$ame L new 4Text1ield <=H txt$ame.set"nabled <false=H txt$ame.setBounds <5;?- ??- :;?- :?=H txt2ithdraw L new 4Text1ield <=H txt2ithdraw.set+ori8ontal,lignment <4Text1ield.#IG+T=H

txt2ithdraw.setBounds <5;?- 5:?- :;?- :?=H FF#estricting The 7ser Input to only $umerics in $umeric TextBoxes. txt$o.add/ey&istener <new /ey,dapter<= I public void keyTyped </ey"vent ke= I char c L ke.get/ey*har <=H if <Y<<*haracter.is3igit <c= VV <c LL /ey"vent.!/NB,*/N'(,*"==== I getToolkit<=.beep <=H ke.consume <=H K K K =H txt2ithdraw.add/ey&istener <new /ey,dapter<= I public void keyTyped </ey"vent ke= I char c L ke.get/ey*har <=H if <Y<<*haracter.is3igit <c= VV <c LL /ey"vent.!/NB,*/N'(,*"==== I getToolkit<=.beep <=H ke.consume <=H K K K =H FF*reating 3ate ption. 'tring %onthsPQ L IJ4anuaryJ- J1ebruaryJ- J%archJ- J,prilJ- J%ayJJ4uneJJ4ulyJ- J,ugustJ- J'eptemberJ- J ctoberJ- J$ovemberJ- J3ecemberJKH cbo%onth L new 4*omboBox <%onths=H cbo3ay L new 4*omboBox <=H cbo)ear L new 4*omboBox <=H for <int i L 5H i TL 65H iMM= I 'tring days L JJ M iH cbo3ay.addItem <days=H K for <int i L :;;;H i TL :;5?H iMM= I 'tring years L JJ M iH cbo)ear.addItem <years=H K FF,ligning The 3ate ption *ontrols. cbo%onth.setBounds <5;?- E;- E:- :?=H

cbo3ay.setBounds <:;:- E;- @6- :?=H cbo)ear.setBounds <:?;- E;- >;- :?=H FF,ligning The Buttons. btn'ave L new 4Button <J'aveJ=H btn'ave.setBounds <:;- 5>?- 5:;- :?=H btn'ave.add,ction&istener <this=H btn*ancel L new 4Button <J*ancelJ=H btn*ancel.setBounds <5D?- 5>?- 5:;- :?=H btn*ancel.add,ction&istener <this=H FF,dding the ,ll the *ontrols to (anel. jp2ith.add <lb$o=H jp2ith.add <txt$o=H jp2ith.add <lb$ame=H jp2ith.add <txt$ame=H jp2ith.add <lb3ate=H jp2ith.add <cbo%onth=H jp2ith.add <cbo3ay=H jp2ith.add <cbo)ear=H jp2ith.add <lb2ithdraw=H jp2ith.add <txt2ithdraw=H jp2ith.add <btn'ave=H jp2ith.add <btn*ancel=H FF,dding (anel to 2indow. get*ontent(ane<=.add <jp2ith=H populate,rray <=H FF&oad ,ll "xisting #ecords in %emory. FFIn the "nd 'howing the $ew ,ccount 2indow. set!isible <true=H K FF1unction use By Buttons of 2indow to (erform ,ction as 7ser *lick Them. public void action(erformed <,ction"vent ae= I bject obj L ae.get'ource<=H if <obj LL btn'ave= I if <txt$o.getText<=.equals<JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide Id of *ustomer.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt$o.request1ocus<=H K

else if <txt2ithdraw.getText<=.equals<JJ== I 4 ption(ane.show%essage3ialog <this- J(leaseY (rovide 2ithdraw ,mount.JJBank'ystem R "mpty1ieldJ- 4 ption(ane.(&,I$N%"'',G"=H txt2ithdraw.request1ocus <=H K else I withdraw L Integer.parseInt <txt2ithdraw.getText <==H if <curr LL ;= I 4 ption(ane.show%essage3ialog <this- txt$ame.getText <= M J doesnOt have any ,mount in Balance.JJBank'ystem R "mpty,ccountJ- 4 ption(ane.(&,I$N%"'',G"=H txt*lear <=H K else if <withdraw Z curr= I 4 ption(ane.show%essage3ialog <this- J2ithdraw ,mount canOt greater than ,ctual Balance.JJBank'ystem R &arge ,mountJ- 4 ption(ane.(&,I$N%"'',G"=H txt2ithdraw.setText <JJ=H txt2ithdraw.request1ocus <=H K else I edit#ec <=H FF7pdate the *ontents of ,rray. K K K if <obj LL btn*ancel= I txt*lear <=H set!isible <false=H dispose<=H K K FF1unction use to load all #ecords from 1ile when ,pplication "xecute. void populate,rray <= I try I fis L new 1ileInput'tream <JBank.datJ=H dis L new 3ataInput'tream <fis=H FF&oop to (opulate the ,rray.

while <true= I for <int i L ;H i T >H iMM= I recordsProwsQPiQ L dis.read7T1 <=H K rowsMMH K K catch <"xception ex= I total L rowsH if <total LL ;= I 4 ption(ane.show%essage3ialog <null- J#ecords 1ile is "mpty.Wn"nter #ecords 1irst to 3isplay.JJBank'ystem R "mpty1ileJ- 4 ption(ane.(&,I$N%"'',G"=H btn"nable <=H K else I try I dis.close<=H fis.close<=H K catch <"xception exp= I K K K K FF1unction use to 1ind #ecord by %atching the *ontents of #ecords ,rray with I3 TextBox. void find#ec <= I boolean found L falseH for <int x L ;H x T totalH xMM= I if <recordsPxQP;Q.equals <txt$o.getText<=== I found L trueH show#ec <x=H breakH K K if <found LL false= I 'tring str L txt$o.getText <=H txt*lear <=H

4 ption(ane.show%essage3ialog <this- J,ccount $o. J M str M J doesnOt "xist.JJBank'ystem R 2rong$oJ- 4 ption(ane.(&,I$N%"'',G"=H K K FF1unction which display #ecord from ,rray onto the 1orm. public void show#ec <int int#ec= I txt$o.setText <recordsPint#ecQP;Q=H txt$ame.setText <recordsPint#ecQP5Q=H curr L Integer.parseInt <recordsPint#ecQP?Q=H rec*ount L int#ecH K FF1unction use to *lear all Text1ields of 2indow. void txt*lear <= I txt$o.setText <JJ=H txt$ame.setText <JJ=H txt2ithdraw.setText <JJ=H txt$o.request1ocus <=H K FF1unction use to "dit an "lementOs !alue of the ,rray. public void edit#ec <= I recordsPrec*ountQP;Q L txt$o.getText <=H recordsPrec*ountQP5Q L txt$ame.getText <=H recordsPrec*ountQP:Q L JJ M cbo%onth.get'electedItem <=H recordsPrec*ountQP6Q L JJ M cbo3ay.get'electedItem <=H recordsPrec*ountQP@Q L JJ M cbo)ear.get'electedItem <=H recordsPrec*ountQP?Q L JJ M <curr R withdraw=H edit1ile <=H FF'ave This ,rray to 1ile. K FF1unction use to 'ave #ecords to 1ile ,fter editing the #ecord of 7ser *hoice. public void edit1ile <= I try I 1ile utput'tream fos L new 1ile utput'tream <JBank.datJ=H 3ata utput'tream dos L new 3ata utput'tream <fos=H if <records YL null= I for <int i L ;H i T totalH iMM= I for <int c L ;H c T >H cMM= I dos.write7T1 <recordsPiQPcQ=H

if <recordsPiQPcQ LL null= breakH K K 4 ption(ane.show%essage3ialog <this- JThe 1ile is 7pdated 'uccessfullyJJBank'ystem R #ecord 'avedJ- 4 ption(ane.(&,I$N%"'',G"=H txt*lear <=H dos.close<=H fos.close<=H K K catch <I "xception ioe= I 4 ption(ane.show%essage3ialog <this- JThere are 'ome (roblem with 1ileJJBank'ystem R (roblemJ- 4 ption(ane.(&,I$N%"'',G"=H K K FF1unction use to &ock all Buttons of 2indow. void btn"nable <= I txt$o.set"nabled <false=H cbo%onth.set"nabled <false=H cbo3ay.set"nabled <false=H cbo)ear.set"nabled <false=H txt2ithdraw.set"nabled <false=H btn'ave.set"nabled <false=H K K

"(T-(T *CREE!

O0T$0T S& EE! "odule > .

&reate a new account "odule @ 1

$rint customer Aalance "odule @ 3

Deposit money "odule @ 4

5ithdraw "oney "odule @ 7

Delete 'ccount Holder "odule @ 8

Search *y 'ccount !o"odule > 9

Search a customer Ay !ame "odule @ :

View account holders one Ay one "odule @ ;

View account holders all at once "odule @ .<

&hange Aackground color "odule > ..

*anking system shortcut keys "odule @ .1

TE*TI!%

TESTI!G
In this phase we strive to check out the error in implementing sFw package. Internet of different modules is under taken once they have been coded 9 unit tested. 3uring the integrating 9 system testing phase the modules are integrated in a planned manner. The different module making up the sFw product are never integrated in one shot- Integration is normally carried out incrementally over a number of steps. 'ystem testing is usually consisting of three kinds of testing activitiesA

'#$H' TESTI!G= It is a system testing performed by development team .

*ET' TESTI!G = It is system testing performed by friendly set of customer.

'&&E$T'!&E TESTI!G = It is system performed by the customer himself after the delivery to determine to accept or reject the determine whether to accept or reject the delivered project.

CONCLUSION

&O!&#0SIO!

%y project .B,$/I$G ')'T"%0 is based on 4,!, language- to create a project I have used mainly various controls- error handling exceptionsbreak case- looping statements- user defined function and so many functions. 7sing all these above we create a perfect- powerful- effective project in 4,!, language and also use the +T%& for this project. ur project is centrali8e the whole information as ,ccount no.- $ame- pening 3ate 9 also the Bank balance of the all account holders. This software program is used to create a new account- to print customer balance- to edit or update the information of all account holders. This software program is much more useful for Bank management.

F(T(RE *C"-E

)!T!RE SCOPE

5= The project can be enabled on a single computer used in banks. := The projects can be served as a customer operations and administrator control.

.I.$I"%RA-)Y

*I*#IOG '$H%
ne thing is very important part of project is bibliography. In my project record of bibliography is very different because for develop this software we join several online friend and get some knowledge therefore they are part of this page.

/'A

5= programming with java by " Balagurusamy := *omplete #eference of java I$T"#$"TA 5= www.google.com := www.codeproject.com

T*ANKS

You might also like