Project 4 5th Sem FfT

197
A Project Report on VIDEO LIBRARY MANAGEMENT SYSTEM in the Partial Fulfillment of Requirement for the Degree of BACHELOR OF TECHNOLOGY(B.TECH) (2009-12) Under th e Sup ervision of:  I nternal Sup ervisor Ext ernal Sup ervisor Mrs. Vandana Dabbas Mr. Raj Kumar Assistant Professor, B.TECH Dept. Baluja Labs Institute of Technology P. D. M. College of Engg and Management Bahadurgarh Submitted by: RAVI VIRMANI 9113,CSE-2 B.TECH P. D. M. College of Engg, Bahadurgarh BACHELOR OF TECHNOLOGY(B.TECH) P.D.M. COLLEGE OF ENGG,BAHADURGARH (Affiliated to Maharshi Dayanand University, Rohtak) 

Transcript of Project 4 5th Sem FfT

Page 1: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 1/197

A

Project Report

on

VIDEO LIBRARY MANAGEMENT SYSTEM

in the Partial Fulfillment of

Requirement for the Degree of

BACHELOR OF TECHNOLOGY(B.TECH) (2009-12)

Under th e Sup ervision of:

Internal Sup ervisor External Sup ervisor

Mrs. Vandana Dabbas Mr. Raj Kum ar

Assistant Professor, B.TECH Dept. Baluja Labs Institute of Technology

P. D. M. College of Engg and Management

Bahadurgarh

Subm itt ed by:

RAVI VIRMANI

9113 ,CSE-2

B.TECH

P. D. M. College of Engg,

Bahadurgarh

BACHELOR OF TECHNOLOGY(B.TECH)

P.D.M. COLLEGE OF ENGG,BAHADURGARH

(Affiliated to Maharshi Dayanand University, Rohtak )

Page 2: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 2/197

Certificate

This is to certify that the project entitled " VIDEO LIBRARY MANAGEMENT SYSTEM " is a bonafide work carried out by me at ³BALUJA LABS TE CH NOLOGY AND

MANAGEMENT³ in the partial fulfillment of the requirement for the award of the degree of

BA CH ELOR OF TE CH NOLOGY . The matter embodied in this project report has not been

submitted elsewhere by anybody for the award of any other degree.

(RAVI VIRMANI)

Certified that the Project Report entitled ³ VIDEO LIBRARY MANAGEMENT SYSTEM ³ by

³RAVI VIRMANI³ is completed under my guidance.

Page 3: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 3/197

ACK NOWLEDGEMENT

W ith Candor and Pleasure I take opportunity to express my sincere thanks and obligation to my

esteemed guide GURVINDER BALUJA . It is because of his able and mature guidance and co-

operation without which it would not have been possible for me to complete my project.

It is my pleasant duty to thank all the staff member of the computer center who never hesitated

me from time during the project.

Finally, I gratefully acknowledge the support, encouragement & patience of my family, and as

always, nothing in my life would be possible without God, Thank You!

Page 4: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 4/197

INDEX

Page 5: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 5/197

Page 6: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 6/197

C OMPANY PROFILE:

Balujalabs is a global IT based Company Specializes in the field of W ebsite developmentPromotion, It Training & consultancy.

Baluja Labs is among the top ' outs ourcing web devel opm ent services ' companies based in India.W e provide outstanding outs ourcing web devel opm ent designs with cost-effective solutions for our clients in India, Europe and USA. W e also provide outsourcing services using BOT (builtoperate transfer) model, including website development, web design, offshore developmentdesign services, custom software application programming, information technology applicationsusing PHP, MySQL, .net, J2EE, etc. Besides this, we also offer other outsource web design anddevelopment services.

Baluja Labs, a professional web design and website development company is focused on small tomid-size businesses contributing website d esign and online m arketing services to clients.Today, we are proud to support many other software companies for their critical IT requirements.

W e provide conceptual, functional and presentational development for the global businesscommunity through out-of-the-box web strategy, design and technology solutions. Combiningdiverse expertise in business strategy, technology, usability and design, Pegasus InfoCorp

produces highly scalable business solutions and online positive user experiences.

Your online success is our top priority. W e are providing p r ofessi onal web soluti ons to help businesses and individuals discover and expand into the area of interactive web business or toimprove on their existing websites. Our team is trained to be highly communicative andresponsive using advanced technologies in telecommunications and the Internet. W e employ the

professionals with state-of-the-art technologies in the market today.

Baluja Labs adopted the onshore / offshore model to optimize efficiency, quality and cost where itmakes sense. W e deploy part of the project resources onsite. These resources are dedicated tocommunication with the end-users, study and analysis of the business, the creation of test plansand integration testing.

W e believe that delivering quality services is our mission. Baluja Labs has been proud to dedicateits resources and talented team of experts to the service of the software industry. W e have alwaysstrived hard to accommodate the specific needs of each customer.

Page 7: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 7/197

Services P r ovided by the C omp any :-

Search Engine O p tim izati on Search Engine Optimization (or SEO) is a series of techniques used to improve the ranking of your website listing in search engines like Google, Yahoo and MSN. Recent surveys show thatmore than 87% of Internet users use search engines to find services, products and information.Unless your site appears prominently on the search engines, potential customers will goelsewhere.

Link Buil d ing/ Pop ularity Building permanent and relevant inbound links to your website yields a steady flow of traffic.Clients who use our link building service achieve higher search engine rankings and benefit frommore targeted prospects and potentially higher sales.

W ebsite Designing Balujalabs is a unique and professional W eb design company offering a variety of services from

basic W ebsite Design to complete e-commerce stores. W e specialize in best-in-class websitedesign, online marketing, Flash multimedia, corporate identity and print graphics.

Internet M arketing Internet Marketing is an inclusive discipline that uses SEO and other online marketing tools togain the attention of both potential customers and the search engines. These tools work to drivemotivated traffic to your website, allow you to compete more effectively and increase sales.

Increase T raffic/ L ea d s/Sales Along with link popularity, there are many effective tactics to increase traffic to your website.However, a comprehensive strategy to increase traffic, leads, sales or other conversions is our truefocus.

Content Devel opm ent A requirement for marketing success is website content. Your site must be rich in content andcontain all relevant keywords to increase your site¶s visibility and readership. W e integrate your keywords into your website content so they flow seamlessly to deliver your message to your

prospects.

E- comm erce Soluti ons Balujalabs is an e-commerce solution and service provider to small and medium sized businessesworldwide and market leading line of e-commerce solution provides organizations of all types the

power to create e-commerce systems that leverage the capabilities of the Internet to grow their businesses.

Page 8: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 8/197

Page 9: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 9/197

INTRODU C TION

The Video Library Management System deals in management of records. The records includevideos which are required by different customers accordingly. Maintaining these recordsmanually becomes difficult thus we are proving such system a computerized backend.

A library database needs to store information pertaining to its users.(or customers), its workers, the physical locations of its branches, andthe media stored in those locations.

The library must keep track of the status of each media item: itslocation, status, descriptive attributes, and cost for losses and latereturns.In order to allow multiple copies of the same video, each mediaitem will have a unique ID number.

Customers will provide their name, address, phone number, and password when signing up for alibrary card. They will then be assigneda unique login id and password.Each library card will haveits own fines, but active fines on any of a customer's cards will preventthe customer from using the library's services.

G oal

To develop an Video Library Management System .

The Library Management deals in management of records. Records include videos required bycustomers accordingly. Maintaining these records manually becomes difficult. Automatedsystems help in maintaining these records easily. Thus a lot of time can be saved and correctinformation about the student can be accessed .

O bjectives

To ensure the following :

Ease of maintenance of records by

library.

Ease of maintenance of charges for

late return.

Ease of use.

Ease of management.

Page 10: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 10/197

Ease of upgrade.

Saving the valuable time of the library.

All of the above while keeping the

system scalable.

O perati ons that can be perf or m ed

1.) By administrator:

a) adding new cassette.

b) deleting old cassette.

c) editing old cassette with new name .

d) editing a user.

e) deleting existing user.

f) enabling a user.

g) disabling a user.

2.) By user:

a) issue a cassette.

b) return a cassette.

c) paying the bill issued.

Page 11: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 11/197

Input & Output D esign (Screen Layo ut s)

Sna psh ots :

H OME PAGE:-

Page 12: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 12/197

W H EN ADMINISTRATOR LOGGED IN:-

Page 13: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 13/197

AUT H ORIZATION TO T H E ADMINISTRATOR TO A CC ESS:-

Page 14: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 14/197

IF WRONG PASSWORD IS ENTERED:-

Page 15: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 15/197

OPERATIONS T H AT ADMINISTRATOR C AN PERFORM:-

Page 16: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 16/197

ADDING A NEW C ASSETTE TO T H E LIBRARY:-

Page 17: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 17/197

EDITTING AN OLD C ASSETTE WIT H A NEW NAME:-

s

Page 18: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 18/197

Page 19: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 19/197

DELETING AN EXISTING C ASSETTE:-

Page 20: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 20/197

EDITTING AN OLD USER WIT H NEW NAME:-

1.) CH E CK ING FOR T H E AVAILABILITY OF NEW ID:-

Page 21: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 21/197

2.) VALID PASSWORD ENTERED:-

Page 22: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 22/197

3.) RE C ORD ENTERED:-

Page 23: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 23/197

NEW USER RE C ORD ENTERED:-

1.)CH ECK ING FOR AVAILABILITY OF ID

Page 24: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 24/197

2.)VALIDITY OF PASSWORD CH ECK ED:-

Page 25: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 25/197

3.)RE C ORD ENTERED:-

Page 26: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 26/197

DELETING T H E EXISTING USERS:-

Page 27: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 27/197

Page 28: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 28/197

DISABLING T H E A C TIVATED USER:-

Page 29: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 29/197

USER DISABLED:-

Page 30: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 30/197

W H EN USER IS DISABLED BY ADMINISTRATOR:-

Page 31: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 31/197

AC TIVATING T H E DISABLED USER:-

Page 32: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 32/197

USER ENABLED:-

Page 33: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 33/197

LOGIN ID OF USER:-

Page 34: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 34/197

Page 35: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 35/197

USER AUT H ORIZED TO A CC ESS:-

Page 36: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 36/197

MAIN MENU:-

Page 37: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 37/197

W H EN USER ISSUED T H E C ASSETTE:-

Page 38: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 38/197

W H EN USER RETURNED C ASSETTE:-

Page 39: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 39/197

BILL TO BE PAYED BY T H E USER AFTER RETURNING T H EC ASSETTE:-

Page 40: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 40/197

SEAR CH ING FOR A C ASSETTE C ODE:-

Page 41: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 41/197

C ODE FOUND:-

Page 42: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 42/197

AS K ING FOR T H E C ASSETTE BY GIVING ITS C ODE:-

Page 43: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 43/197

C ASSETTE ISSUED:-

Page 44: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 44/197

BOLLYWOOD C ASSETTE IN T H E LIBRARY:-

Page 45: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 45/197

W H EN PREVIOUS C ASSETTE IS NOT RETURNED,T H IS ERROR MESSAGE IS S H OWN:-

Page 46: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 46/197

C ASSETTE ISSUED FROM BOLLYWOOD TRA CK S:-

Page 47: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 47/197

C ASSETTE RETURNED:-

Page 48: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 48/197

BILL ISSUED:-

Page 49: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 49/197

H OLLYWOOD C ASSETTE IN T H E LIBRARY:-

Page 50: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 50/197

C ASSETTE ISSUED FROM H OLLYWOOD TRA CK S:-

Page 51: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 51/197

C ASSETTE RETURNED:-

Page 52: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 52/197

BILL ISSUED:-

Page 53: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 53/197

BH AK TI C ASSETTE IN T H E LIBRARY:-

Page 54: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 54/197

C ASSETTE ISSUED FROM B H AK TI TRA CK S:-

Page 55: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 55/197

C ASSETTE RETURNED:-

Page 56: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 56/197

BILL ISSUED:-

Page 57: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 57/197

OT H ER C ASSETTE IN T H E LIBRARY:-

Page 58: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 58/197

C ASSETTE ISSUED FROM OT H ER TRA CK S:-

Page 59: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 59/197

C ASSETTE RETURNED:-

Page 60: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 60/197

BILL ISSUED:-

Page 61: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 61/197

LOGGING OUT:-

Page 62: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 62/197

Page 63: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 63/197

C ODING

imp or t java.aw t .*;

imp or t java.aw t .even t .Act ion Even t ;

impo rt java .awt.event .Acti onL istener; impo rt java .io.IOEx cepti on; impo rt java .sql .Driver M anager; impo rt java .sql .SQLEx cepti on;

impo rt java .sql .State m ent; impo rt java .util .Arrays;

impo rt java x.swing .*;

impo rt com.m ysql . jdbc .C onnecti on; impo rt com.m ysql . jdbc .R esult Set;

public class vdo exten ds JF ra m e imp lem ents Acti onL istener {

JF ra m e f m,f m1,f m 2,f m3,f m4 ,f m5 ,f m6 ,f m7 ,f m8 ,f m9 ,f m10, f m11, f m 12, f m13, f m14,f m15,f m 16,f m17,f m18,f m19,f m20 ;

JB utt on b ,b1,b2,b3,b4,b5,b6,b7; JB utt on

b8,b9,b10, b11, b12, b13, b14,b15,b16,b17,b18,b19,b20, b21,b22, b23, b24,b25,b26,b27,b28,b29,b30 ;

JB utt on b31, b32, b33, b34,b35,b36,b37,b38,b39,b40,b41,b42,b43,b

Page 64: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 64/197

44 ,b45 ,b46 ,b47,b48,b49 ,b50,b51,b52,b53,b54 ,b55 ,b56,b57,b58 ,b59,b60;

JB utt on b61,b62,b63,b64 ,b65,b66 ,b67 ,b68 ,b69 ,b70,b71,b72,b73,b74 ,b75 ,b76 ,b77,b78,b79 ,b80;

JL abel l,l1,l2, l3, l4,l5,l6,l7,l8,l9,l10, l11, l12, l13, l14,l15,l16,l17,l18,l19,l20, l21, l22, l23, l24,l25,l26,l27,l28,l29,l30, l31, l32, l33, l34,l35,l36,l37,l38,l39,l40;

JT extF ieldt ,t1, t2, t3,t4,t5,t6,t7,t8,t9,t10, t11, t12, t13, t14,t15,t16,t17,t18,t19,t20 ;

JT extF ieldt21, t22, t23, t24,t25,t26,t27,t28,t29,t30, t31, t32, t33, t34,t35,t36,t37,t38,t39,t40;

JP ass wor dF ield p ,p1,p2,adpass ,p3,p4 ,p5 ; JT extArea ta ,ta 1; JR ad ioButt on

r ,r 1,r 2,r 3,r 4,r 5,r 6,r 7,r 8,r 9,r 10, r 11, r 12, r 13, r 14,r 15; C onnecti on con = null;

String url =" jdbc : mysql : //localh ost :330 6/videolib 1" ;

String driver = " com.m ysql . jdbc .Driver " ; String user = " r oot" ; String pass = "123 4" ; Butt onG r oup gr oup,gr oup1, gp;

public static void main (String args[] )thr ows IOEx cepti on

{vdo v=ne w vdo(); }

Page 65: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 65/197

public vdo(){

f m=ne w JF ra m e("LOGIN") ; f m. set Size (500, 500) ;

f m. set Visible (true ); f m. set L ay out (null ); f m. set Backgr oun d( C olor .light G ray ); l5=ne w JL abel ("N ew U ser ") ; f m. add( l5); l5.set Boun ds(100, 100, 100, 40); b=ne w JB utt on("S ign Up") ; f m. add( b); b .set Boun ds(200,100,100, 40); l6=ne w JL abel ("L ogin ID") ; f m. add( l6); l6.set Boun ds(100, 1 75 , 100, 40); t3= ne w JT extF ield(30) ; f m. add( t3) ; t3.set Boun ds(200, 1 75 , 150, 40);

l7=ne w JL abel ("P ass wor d") ; f m. add( l7); l7.set Boun ds(100, 22 5, 100, 40); p2= ne w JP ass wor dF ield(30) ; f m. add( p2); p2.set Boun ds(200, 22 5, 150, 40); b1= ne w JB utt on("L ogin ") ; f m. add( b1); b1.set Boun ds(100,300,100, 40); b2= ne w JB utt on("Ex it ") ; f m. add( b2); b2.set Boun ds(270,300,100, 40); b15=ne w JB utt on("Ad min L ogin ") ; f m. add( b15);

Page 66: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 66/197

b15.set Boun ds(370, 410, 110, 30) ; b .addA cti onL istener (this ); b1.addA cti onL istener (this ); b2.addA cti onL istener (this ); b15.addA cti onL istener (this );

}

public void v1(){

f m1= ne w JF ra me(" ne w m em ber ") ; f m1.set Size (620, 550); f m1.set Visible (true ); f m1.set L ay out (null ); f m1.set Backgr oun d( C olor .light G ray ); l=ne w JL abel ("E nter User ID") ; f m1.a dd( l); l.set Boun ds(80, 70, 200, 40); t=ne w JT extF ield(30) ; f m1.a dd( t);

t .set Boun ds(250,70,200, 40) ; b5=ne w JB utt on(" Check Availability ") ; f m1.a dd( b5); b5.set Boun ds(46 0, 70, 1 50, 40); l1= ne w JL abel ("D esire d P ass wor d") ; f m1.a dd( l1) ; l1.set Boun ds(80, 1 40, 200, 40) ; p=ne w JP ass wor dF ield(20) ; f m1.a dd( p); p. set Font (ne w F ont (" mo nosp ace d",

Font .BOLD, 20)) ; p. set Boun ds(250,1 40,200, 40); l2= ne w JL abel ("V erify Pass wor d") ; f m1.a dd( l2) ;

Page 67: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 67/197

l2.set Boun ds(80, 210, 200, 40) ; p1= ne w JP ass wor dF ield(20) ; f m1.a dd( p1) ; p1.set Font (ne w F ont (" mo nospace d",

Font .BOLD, 20)) ;

p1.set Boun ds(250,210,200, 40); l3= ne w JL abel ("Add ress ") ; f m1.a dd( l3) ; l3.set Boun ds(80,2 80,200, 40 ) ; t1= ne w JT extF ield(30) ; f m1.a dd( t1) ; t1.set Boun ds(250, 2 80, 200, 40); l4=ne w JL abel ("M obile No.") ; f m1.a dd( l4); l4.set Boun ds(80,3 50,200, 40 ) ; t2= ne w JT extF ield(30) ; f m1.a dd( t2) ; t2.set Boun ds(250, 3 50, 200, 40); b3= ne w JB utt on("S ub m it ") ; f m1.a dd( b3) ;

b3.set Boun ds(90,440,100, 40); b4=ne w JB utt on("Ex it ") ; f m1.a dd( b4); b4.set Boun ds(270,440,100, 40); b3.addA cti onL istener (this ); b4.addA cti onL istener (this ); b5.addA cti onL istener (this );

}

public void cas 1(){

f m3= ne w JF ra me(" cassette ") ; f m3.set Size (500, 500) ;

Page 68: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 68/197

f m3.set Visible (true ); f m3.set L ay out (null ); f m3.set Backgr oun d( C olor .light G ray ); l5=ne w JL abel (" Cassette C ode") ; f m3.a dd( l5);

l5.set Boun ds(70, 70, 100, 30) ; t4=ne w JT extF ield(30) ; f m3.a dd( t4); t4.set Boun ds(200, 70, 100, 30) ; l6=ne w JL abel ("N am e") ; f m3.a dd( l6); l6.set Boun ds(70, 120, 100, 30) ; t5=ne w JT extF ield(30) ; f m3.a dd( t5); t5.set Boun ds(200, 120, 100, 30) ; l7=ne w JL abel (" C op ies ") ; f m3.a dd( l7); l7.set Boun ds(70,1 70 ,100, 30) ; t6=ne w JT extF ield(30) ; f m3.a dd( t6);

t6.set Boun ds(200, 1 70, 100, 30) ; l8=ne w JL abel (" C ost ") ; f m3.a dd( l8); l8.set Boun ds(70, 220, 100, 30) ; t7=ne w JT extF ield(30) ; f m3.a dd( t7); t7.set Boun ds(200, 220, 100, 30) ; l9=ne w JL abel (" tag ") ; f m3.a dd( l9); l9.set Boun ds(70, 2 70, 100, 30) ;

gr oup = ne w B utt onG r oup(); r = ne w JR ad ioButt on("B olly wood", true ); gr oup. a dd( r ); f m3.add( r );

Page 69: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 69/197

r .set Boun ds(200, 2 70, 100, 30) ; r .set Acti onC omm an d(" bolly wood") ; r 1 = ne w JR adioButt on(" H olly wood", false ); gr oup. add( r 1) ; f m3.add( r 1) ;

r 1.set Boun ds(200, 310, 100, 30) ; r 1.set Acti onC omm an d(" h ollywood") ; r 2 = ne w JR adioButt on("B hakti ", false ); gr oup. add( r 2) ; f m3.add( r 2) ; r 2.set Boun ds(310, 2 70, 100, 30) ; r 2.set Acti onC omm an d(" bhakti ") ; r 3 = ne w JR adioButt on("O thers ", false ); gr oup. add( r 3) ; f m3.add( r 3) ; r 3.set Boun ds(310, 310, 100, 30) ; r 3.set Acti onC omm an d(" others ") ; b13= ne w JB utt on("ADD") ; f m3.add( b13) ; b13 .set Boun ds(70, 3 50, 100, 30) ;

b14=ne w JB utt on("Ex it ") ; f m3.add( b14); b14.set Boun ds(200, 3 50, 100, 30) ; b13 .addA cti onL istener (this ); b14.addA cti onL istener (this ); }

public void editcas (){

f m6 =ne w JF ra me("Ad m in ") ; f m6. set Size (500, 500) ; f m6. set Visible (true ); f m6. set L ay out (null ); f m6. set Backgr oun d( C olor .light G ray );

Page 70: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 70/197

l17=ne w JL abel ("O ld Cassette C od e") ; f m6. a dd( l17); l17.set Boun ds(70, 30, 120, 30) ; t13= ne w JT extField(30) ; f m6. a dd( t13) ;

t13 .set Boun ds(220, 30, 100, 30) ; l12= ne w JL abel ("N ew Cassette C ode") ; f m6. a dd( l12) ; l12 .set Boun ds(70, 70, 120, 30) ; t9=ne w JT extF ield(30) ; f m6. a dd( t9); t9.set Boun ds(220, 70, 100, 30) ; l13= ne w JL abel ("N ew N am e") ; f m6. a dd( l13) ; l13 .set Boun ds(70, 120, 100, 30) ; t10= ne w JT extField(30) ; f m6. a dd( t10) ; t10 .set Boun ds(220, 120, 100, 30) ; l14=ne w JL abel ("N ew C op ies ") ; f m6. a dd( l14);

l14.set Boun ds(70,1 70 ,100, 30) ; t11= ne w JT extField(30) ; f m6. a dd( t11) ; t11 .set Boun ds(220, 1 70, 100, 30) ; l15=ne w JL abel ("N ew C ost ") ; f m6. a dd( l15); l15.set Boun ds(70, 220, 100, 30) ; t12= ne w JT extField(30) ; f m6. a dd( t12) ; t12 .set Boun ds(220, 220, 100, 30) ; l16=ne w JL abel ("N ew T ag ") ; f m6. a dd( l16); l16.set Boun ds(70, 2 70, 100, 30) ;

gr oup1 = ne w B utt onG r oup();

Page 71: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 71/197

r 4 = ne w JR adioButt on("B ollywood", true ); gr oup1.add( r 4); f m6. add( r 4); r 4.set Boun ds(200, 2 70, 100, 30) ; r 4.set Acti onC omm an d(" b ollywood") ;

r 5 = ne w JR adioButt on(" H olly wood", false ); gr oup1.add( r 5); f m6. add( r 5); r 5.set Boun ds(200, 310, 100, 30) ; r 5.set Acti onC omm an d(" h ollywood") ; r 6 = ne w JR adioButt on("B hakti ", false ); gr oup1.add( r 6); f m6. add( r 6); r 6.set Boun ds(310, 2 70, 100, 30) ; r 6.set Acti onC omm an d(" bhakti ") ; r 7 = ne w JR adioButt on("O thers ", false ); gr oup1.add( r 7); f m6. add( r 7); r 7.set Boun ds(310, 310, 100, 30) ; r 7.set Acti onC omm an d(" others ") ;

b24=ne w JB utt on("U pdate ") ; f m6. add( b24); b24.set Boun ds(70, 3 50, 100, 30) ; b25=ne w JB utt on("Ex it ") ; f m6. add( b25); b25.set Boun ds(200, 3 50, 100, 30) ; b24.addA cti onL istener (this ); b25.addA cti onL istener (this );

}public void ad m in (){

f m4 =ne w JF ra me("Ad m inistrat or ") ; f m4. set Size (500, 500) ;

Page 72: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 72/197

f m4. set Visible (true ); f m4. set L ay out (null ); f m4. set Backgr oun d( C olor .light G ray ); l10= ne w JL abel ("Ad min ID") ; f m4. a dd( l10) ;

l10 .set Boun ds(100,100,100, 40) ; t8=ne w JT extF ield(30) ; f m4. a dd( t8); t8.set Boun ds(200,100,1 70,40); l11= ne w JL abel ("P ass wor d") ; f m4. a dd( l11) ; l11 .set Boun ds(100, 200, 100, 40); adpass = ne w JP ass wor dF ield(30) ; f m4. a dd( adp ass ); adpass .set Boun ds(200, 200,1 70,40); b16=ne w JB utt on("L ogin ") ; f m4. a dd( b16); b16.set Boun ds(100, 300, 100, 40); b17=ne w JB utt on("Ex it") ; f m4. a dd( b17);

b17.set Boun ds(270, 300, 100, 40); b16.addA cti onL istener (this ); b17.addA cti onL istener (this );

}

public void d isuser (){

f m10= ne w JF ra m e("D isable User Acct .") ; f m10 .set Size (500, 500) ; f m10 .set Visible (true ); f m10 .set L ay out (null ); f m10 .set Backgr oun d( C olor .light G ray ); l26=ne w JL abel ("U ser ID") ;

Page 73: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 73/197

f m10 .add( l26); l26.set Boun ds(150, 100, 100, 30) ; t20= ne w JT extField(30) ; f m10 .add( t20) ; t20 .set Boun ds(250, 100, 1 50, 30) ;

b34=ne w JB utt on("D isable ") ; f m10 .add( b34); b34.set Boun ds(100, 200, 100, 30) ; b35=ne w JB utt on("Ex it") ; f m10 .add( b35); b35.set Boun ds(300, 200, 100,30) ; b34.addA cti onL istener (this ); b35.addA cti onL istener (this );

}public void enuser (){

f m11= ne w JF ra m e("E nable User Acct .") ; f m11 .set Size (500, 500) ; f m11 .set Visible (true ); f m11 .set L ay out (null );

f m11 .set Backgr oun d( C olor .light G ray ); l27=ne w JL abel ("U ser ID") ; f m11 .add( l27); l27.set Boun ds(150, 100, 100, 30) ; t21= ne w JT extField(30) ; f m11 .add( t21) ; t21 .set Boun ds(250, 100, 1 50, 30) ; b36=ne w JB utt on("E nable ") ; f m11 .add( b36); b36.set Boun ds(100, 200, 100, 30) ; b37=ne w JB utt on("Ex it") ; f m11 .add( b37); b37.set Boun ds(300, 200, 100,30) ; b36.addA cti onL istener (this );

Page 74: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 74/197

b37.addA cti onL istener (this ); }public void ad1(){

f m5 =ne w JF ra me("Ad m in ") ;

f m5. set Size (500, 500) ; f m5. set Visible (true ); f m5. set L ay out (null ); f m5. set Backgr oun d( C olor .light G ray ); b18=ne w JB utt on("Add Cassette ") ; f m5. a dd( b18); b18.set Boun ds(70, 70, 1 40, 40); b19=ne w JB utt on("Ed it Cassette ") ; f m5. a dd( b19); b19.set Boun ds(250, 70, 1 40, 40); b20= ne w JB utt on("D elete Cassette ") ; f m5. a dd( b20) ; b20 .set Boun ds(70, 1 50, 1 40, 40); b21= ne w JB utt on("Ed it User ") ; f m5. a dd( b21) ;

b21 .set Boun ds(250, 1 50, 1 40, 40); b22= ne w JB utt on("D elete User ") ; f m5. a dd( b22) ; b22 .set Boun ds(70, 220, 1 40, 40); b33= ne w JB utt on("D isable User ") ; f m5. a dd( b33) ; b33 .set Boun ds(250, 220, 1 40, 40); b38=ne w JB utt on("E nable User ") ; f m5. a dd( b38); b38.set Boun ds(70, 2 90, 1 40, 40); b23= ne w JB utt on("L ogO ut ") ; f m5. a dd( b23) ; b23 .set Boun ds(400, 400, 80, 30) ; b18.addA cti onL istener (this );

Page 75: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 75/197

b19.addA cti onL istener (this ); b20 .addA cti onL istener (this ); b21 .addA cti onL istener (this ); b22 .addA cti onL istener (this ); b23 .addA cti onL istener (this );

b33 .addA cti onL istener (this ); b38.addA cti onL istener (this );

}public void d elcas (){

f m7 =ne w JF ra me("D elete Cassette ") ; f m7. set Size (500, 500) ; f m7. set Visible (true ); f m7. set L ay out (null ); f m7. set Backgr oun d( C olor .light G ray ); l18=ne w JL abel (" Cassette C ode") ; f m7. a dd( l18); l18.set Boun ds(100, 100, 120, 30) ; t14=ne w JT extField(30) ;

f m7. a dd( t14); t14.set Boun ds(250, 100, 120, 30) ; b26=ne w JB utt on("D elete R ecor d") ; f m7. a dd( b26); b26.set Boun ds(100, 200, 120, 40); b27=ne w JB utt on("Ex it") ; f m7. a dd( b27); b27.set Boun ds(250, 200, 120, 40); b26.addA cti onL istener (this ); b27.addA cti onL istener (this );

}public void edituser (){

Page 76: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 76/197

f m8 =ne w JF ra me("Ed it User ") ; f m8. set Size (55 0,550); f m8. set Visible (true ); f m8. set L ay out (null ); f m8. set Backgr oun d( C olor .light G ray );

l19=ne w JL abel ("O ld U ser ID") ; f m8. a dd( l19); l19.set Boun ds(80, 70, 1 50, 30) ; t15=ne w JT extField(30) ; f m8. a dd( t15); t15.set Boun ds(250,70,1 50,30) ; l20= ne w JL abel ("N ew U ser ID") ; f m8. a dd( l20) ; l20 .set Boun ds(80, 120, 1 50, 30) ; t16=ne w JT extField(30) ; f m8. a dd( t16); t16.set Boun ds(250,120,1 50,30) ; b28=ne w JB utt on(" Check Avail .") ; f m8. a dd( b28); b28.set Boun ds(410, 120, 120, 30) ;

l21= ne w JL abel ("D esire d P ass wor d") ; f m8. a dd( l21) ; l21 .set Boun ds(80, 1 70, 200, 30) ; p3= ne w JP ass wor dF ield(20) ; f m8. a dd( p3) ; p3.set Font (ne w F ont (" mo nospace d",

Font .BOLD, 20)) ; p3.set Boun ds(250,1 70,200,30) ; l22= ne w JL abel ("V erify Pass wor d") ; f m8. a dd( l22) ; l22 .set Boun ds(80, 220, 200, 30) ; p4 =ne w JP ass wor dF ield(20) ; f m8. a dd( p4 );

Page 77: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 77/197

p4. set Font (ne w F ont (" mo nospace d",Font .BOLD, 20)) ;

p4. set Boun ds(250,220,200,30) ; l23= ne w JL abel ("Add ress ") ; f m8. a dd( l23) ;

l23 .set Boun ds(80,2 70,200,30 ) ; t17=ne w JT extField(30) ; f m8. a dd( t17); t17.set Boun ds(250, 2 70, 200, 30) ; l24=ne w JL abel ("M obile No.") ; f m8. a dd( l24); l24.set Boun ds(80,320,200,30 ) ; t18=ne w JT extField(30) ; f m8. a dd( t18); t18.set Boun ds(250, 320, 200, 30) ; b29=ne w JB utt on("S ub m it ") ; f m8. a dd( b29); b29.set Boun ds(90,3 70,80,30) ; b30= ne w JB utt on("Ex it") ; f m8. a dd( b30) ;

b30 .set Boun ds(250,3 70,80,30) ;

b28.addA cti onL istener (this ); b29.addA cti onL istener (this ); b30 .addA cti onL istener (this );

}public void d eluser (){

f m9 =ne w JF ra me("Ed it User ") ; f m9. set Size (500, 500) ; f m9. set Visible (true ); f m9. set L ay out (null ); f m9. set Backgr oun d( C olor .light G ray ); l25=ne w JL abel ("U ser ID") ;

Page 78: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 78/197

f m9. a dd( l25); l25.set Boun ds(150, 100, 100, 30) ; t19=ne w JT extField(30) ; f m9. a dd( t19); t19.set Boun ds(250, 100, 1 50, 30) ;

b31= ne w JB utt on("D elete ") ; f m9. a dd( b31) ; b31 .set Boun ds(100, 200, 100, 30) ; b32= ne w JB utt on("Ex it") ; f m9. a dd( b32) ; b32 .set Boun ds(300, 200, 100,30) ; b31 .addA cti onL istener (this ); b32 .addA cti onL istener (this );

}public void v2(){

f m2= ne w JF ra me("L iberary ") ; f m2.set Size (500, 500) ; f m2.set Visible (true ); f m2.set L ay out (null );

f m2.set Backgr oun d( C olor .light G ray ); ta = ne w JT extArea (" w elc om e! ", 40, 40); ta .set Ed itable (false ); f m2.a dd( ta ); ta .set Boun ds(10, 20, 60, 20) ; b12= ne w JB utt on("L og O ut ") ; f m2.a dd( b12) ; b12 .set Boun ds(400, 10, 80, 30) ; b12 .addA cti onL istener (this ); l4=ne w JL abel ("S earch ") ; f m2.a dd( l4); l4.set Boun ds(80, 30, 100, 50) ; t3= ne w JT extF ield(30) ; f m2.a dd( t3) ;

Page 79: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 79/197

t3.set Boun ds(130, 30, 1 80, 40); b73= ne w JB utt on("S earch ") ; f m2.a dd( b73) ; b73.set Boun ds(31 5, 35, 80, 30) ; Image Icon i= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(5). jpg") ; b6=ne w JB utt on(i); f m2.a dd( b6); b6.set Boun ds(30, 80, 1 50, 113) ; Image Icon i1= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(10) . jpg") ;

b7=ne w JB utt on(i1) ; f m2.a dd( b7); b7.set Boun ds(310, 80, 1 50, 113) ; Image Icon i2= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(16). jpg") ;

b8=ne w JB utt on(i2) ;

f m2.a dd( b8); b8.set Boun ds(30, 200, 1 50, 113) ; Image Icon i3= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(23) . jpg") ;

b9=ne w JB utt on(i3) ; f m2.a dd( b9); b9.set Boun ds(310, 200, 1 50, 113) ; Im age Icon i4=ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(21) . jpg") ;

b10= ne w JB utt on(i4); f m2.a dd( b10) ; b10 .set Boun ds(30, 320, 1 50, 113) ;

Page 80: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 80/197

Image Icon i5=ne wIm age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(18). jpg") ;

b11= ne w JB utt on(i5); f m2.a dd( b11) ;

b11 .set Boun ds(310, 320, 1 50, 113) ; b39=ne w JB utt on("V iew R ecor d") ; f m2.a dd( b39); b39.set Boun ds(195 ,100,110, 40) ; b40= ne w JB utt on("R eturn ") ; f m2.a dd( b40) ; b40.set Boun ds(200, 3 90, 100, 40); b47 =ne w JB utt on("B ollywood") ; f m2.a dd( b47 ); b47. set Boun ds(200, 1 70, 100, 30) ; b48 =ne w JB utt on(" H ollywood") ; f m2.a dd( b48 ); b48. set Boun ds(200, 210, 100, 30) ; b49 =ne w JB utt on("B hakti ") ; f m2.a dd( b49 );

b49. set Boun ds(200, 2 50, 100, 30) ; b50= ne w JB utt on("O thers ") ; f m2.a dd( b50) ; b50.set Boun ds(200, 2 90, 100, 30) ; b39.addA cti onL istener (this ); b47. addA cti onL istener (this ); b48. addA cti onL istener (this ); b49. addA cti onL istener (this ); b50.addA cti onL istener (this ); b6.addA cti onL istener (this ); b40.addA cti onL istener (this ); b7.addA cti onL istener (this ); b8.addA cti onL istener (this ); b9.addA cti onL istener (this );

Page 81: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 81/197

b10 .addA cti onL istener (this ); b11 .addA cti onL istener (this ); b73.addA cti onL istener (this );

}

public void inf o(){f m16=ne w JF ra m e("I nf or m ati on") ; f m16.set Size (500, 500) ; f m16.set Visible (true ); f m16.set L ay out (null ); f m16.set Backgr oun d( C olor .light G ray ); l28=ne w JL abel (" Cassette C ode") ; f m16.add( l28); l28.set Boun ds(100, 30, 100, 30) ; t22= ne w JT extField(30) ; f m16.add( t22) ; t22 .set Boun ds(220, 30, 1 50, 30) ; b51= ne w JB utt on("R eturn ") ; f m16.add( b51);

b51.set Boun ds(250, 70, 100, 30) ; b52= ne w JB utt on("I ssue ") ; f m16.add( b52); b52.set Boun ds(130, 70, 100, 30) ; b52.addA cti onL istener (this ); b51.addA cti onL istener (this );

}public void bolly (){

f m12= ne w JF ra m e("B ollywood T racks ") ; f m12 .set Size (500, 500) ; f m12 .set Visible (true );

Page 82: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 82/197

f m12 .set L ay out (null ); f m12 .set Backgr oun d( C olor .light G ray ); ta = ne w JT extArea (" B ollywood T racks ", 40,

40) ; ta .set Ed itable (false );

f m12 .add( ta ); ta .set Font (ne w F ont (" mo nospace d",Font .BOLD+F ont .ITALI C , 20)) ;

ta .set Boun ds(150, 30, 210, 30) ; Image Icon i= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1 . jpg") ;

b41= ne w JB utt on(i); f m12 .add( b41); b41.set Boun ds(30, 80, 1 50, 113) ; Image Icon i1= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(1) . jpg") ;

b42= ne w JB utt on(i1) ; f m12 .add( b42);

b42.set Boun ds(310, 80, 1 50, 113) ; Image Icon i2= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(3) . jpg") ;

b43= ne w JB utt on(i2) ; f m12 .add( b43); b43.set Boun ds(30, 200, 1 50, 113) ; Image Icon i3= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(4). jpg") ;

b44 =ne w JB utt on(i3) ; f m12 .add( b44 ); b44. set Boun ds(310, 200, 1 50, 113) ;

Page 83: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 83/197

Image Icon i4=ne wIm age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(5). jpg") ;

b45 =ne w JB utt on(i4); f m12 .add( b45 );

b45. set Boun ds(30, 320, 1 50, 113) ; Image Icon i5=ne wIm age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(10) . jpg") ;

b46 =ne w JB utt on(i5); f m12 .add( b46 ); b46. set Boun ds(310, 320, 1 50, 113) ; b41.addA cti onL istener (this ); b42.addA cti onL istener (this ); b43.addA cti onL istener (this ); b44. addA cti onL istener (this ); b45. addA cti onL istener (this ); b46. addA cti onL istener (this );

}

public void holly (){

f m13= ne w JF ra m e(" H olly wood T racks ") ; f m13 .set Size (500, 500) ; f m13 .set Visible (true ); f m13 .set L ay out (null ); f m13 .set Backgr oun d( C olor .light G ray ); ta = ne w JT extArea (" H ollywood T racks ", 40,

40) ; ta .set Ed itable (false ); f m13 .add( ta ); ta .set Font (ne w F ont (" mo nospace d",

Font .BOLD+F ont .ITALI C , 20)) ; ta .set Boun ds(150, 30, 210, 30) ;

Page 84: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 84/197

Image Icon i= ne wIm age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(2) . jpg") ;

b71= ne w JB utt on(i); f m13 .add( b71);

b71.set Boun ds(30, 80, 1 50, 113) ; Image Icon i1= ne wIm age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(6). jpg") ;

b72= ne w JB utt on(i1) ; f m13 .add( b72); b72.set Boun ds(310, 80, 1 50, 113) ; Image Icon i2= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(7). jpg") ;

b53= ne w JB utt on(i2) ; f m13 .add( b53); b53.set Boun ds(30, 200, 1 50, 113) ; Image Icon i3= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1

(8). jpg") ; b54 =ne w JB utt on(i3) ; f m13 .add( b54 ); b54. set Boun ds(310, 200, 1 50, 113) ; Image Icon i4=ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(9). jpg") ;

b55 =ne w JB utt on(i4); f m13 .add( b55 ); b55. set Boun ds(30, 320, 1 50, 113) ; Im age Icon i5=ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(11) . jpg") ;

b56 =ne w JB utt on(i5);

Page 85: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 85/197

f m13 .add( b56 ); b56. set Boun ds(310, 320, 1 50, 113) ; b71.addA cti onL istener (this ); b72.addA cti onL istener (this ); b53.addA cti onL istener (this );

b54. addA cti onL istener (this ); b55. addA cti onL istener (this ); b56. addA cti onL istener (this );

}

public void bhakti (){

f m14=ne w JF ra m e("B hakti T racks ") ; f m14.set Size (500, 500) ; f m14.set Visible (true ); f m14.set L ay out (null ); f m14.set Backgr oun d( C olor .light G ray ); ta = ne w JT extArea (" B hakti T racks ", 40, 40); ta .set Ed itable (false ); f m14.add( ta );

ta .set Font (ne w F ont (" mo nospace d",Font .BOLD+F ont .ITALI C , 20)) ;

ta .set Boun ds(150, 30, 210, 30) ; Image Icon i= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(12) . jpg") ;

b57 =ne w JB utt on(i); f m14.add( b57 ); b57. set Boun ds(30, 80, 1 50, 113) ; Image Icon i1= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(13) . jpg") ;

b58 =ne w JB utt on(i1) ; f m14.add( b58 );

Page 86: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 86/197

b58. set Boun ds(310, 80, 1 50, 113) ; Image Icon i2= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(14). jpg") ;

b59 =ne w JB utt on(i2) ;

f m14.add( b59 ); b59. set Boun ds(30, 200, 1 50, 113) ; Image Icon i3= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(15). jpg") ;

b60= ne w JB utt on(i3) ; f m14.add( b60); b60.set Boun ds(310, 200, 1 50, 113) ; Image Icon i4=ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(16). jpg") ;

b61= ne w JB utt on(i4); f m14.add( b61); b61.set Boun ds(30, 320, 1 50, 113) ; Image Icon i5=ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(17). jpg") ;

b62= ne w JB utt on(i5); f m14.add( b62); b62.set Boun ds(310, 320, 1 50, 113) ; b57. addA cti onL istener (this ); b58. addA cti onL istener (this ); b59. addA cti onL istener (this ); b60.addA cti onL istener (this ); b61.addA cti onL istener (this ); b62.addA cti onL istener (this );

}

public void others ()

Page 87: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 87/197

{f m15=ne w JF ra m e("O ther T racks ") ; f m15.set Size (500, 500) ; f m15.set Visible (true ); f m15.set L ay out (null );

f m15.set Backgr oun d( C olor .light G ray ); ta = ne w JT extArea (" O ther T racks ", 40, 40); ta .set Ed itable (false ); f m15.add( ta ); ta .set Font (ne w F ont (" mo nospace d",

Font .BOLD+F ont .ITALI C , 20)) ; ta .set Boun ds(150, 30, 210, 30) ; Image Icon i= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(21) . jpg") ;

b63= ne w JB utt on(i); f m15.add( b63); b63.set Boun ds(30, 80, 1 50, 113) ; Image Icon i1= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1

(22) . jpg") ; b64 =ne w JB utt on(i1) ; f m15.add( b64 ); b64. set Boun ds(310, 80, 1 50, 113) ; Image Icon i2= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(23) . jpg") ;

b65 =ne w JB utt on(i2) ; f m15.add( b65 ); b65. set Boun ds(30, 200, 1 50, 113) ; Image Icon i3= ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(18). jpg") ;

b66 =ne w JB utt on(i3) ;

Page 88: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 88/197

f m15.add( b66 ); b66. set Boun ds(310, 200, 1 50, 113) ; Image Icon i4=ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(19). jpg") ;

b67 =ne w JB utt on(i4); f m15.add( b67 ); b67. set Boun ds(30, 320, 1 50, 113) ; Image Icon i5=ne w

Im age Icon(" C :\\U sers \\acer \\w orks pace \\video\\im g\\1(20) . jpg") ;

b68 =ne w JB utt on(i5); f m15.add( b68 ); b68. set Boun ds(310, 320, 1 50, 113) ; b64. addA cti onL istener (this ); b65. addA cti onL istener (this ); b66. addA cti onL istener (this ); b67. addA cti onL istener (this ); b68. addA cti onL istener (this ); b63.addA cti onL istener (this );

}public void acti onP erf or m ed(A cti onE vent e){

if (e.get Source ()== b){

v1() ; }if (e.get Source ()== b47 ){

bolly (); }if (e.get Source ()== b48 ){

holly ();

Page 89: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 89/197

}if (e.get Source ()== b49 ){

bhakti (); }

if (e.get Source ()== b50){others ();

}if (e.get Source ()== b22){

deluser (); }

if (e.get Source ()== b21){

ed ituser (); }if (e.get Source ()== b38){

enuser (); }if (e.get Source ()== b18) // add cassette {

cas 1() ; }if (e.get Source ()== b20){

delcas (); }if (e.get Source ()== b33){

disuser (); }

Page 90: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 90/197

if (e.get Source ()== b73) //search {

try {

String s1,s2,s3; s1 = t3.get T ext(); Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent (); if (s1.equals ("")){

JO pti onPane .sh owM essage Dial og(f m2,"E nter any wor d!") ;

}else

{R esult Set res = (R esult Set )

st .execute Q uery (" select * fr om cas where na m e='"+ s1+"'") ;

if (res .ne xt()!=false ){

s2= res .get String (" id") ; s3= res .get String (" na m e") ; if (s1.equals (s3))

{

Page 91: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 91/197

JO pti onPane .sh owM essage Dial og(f m2," Cassette

C ode is :"+ s2); t3.set T ext("") ; }

}else {

JO pti onPane .sh owM essage Dial og(f m2,"N o R esult f oun d") ;

t3.set T ext("") ; }

}con.close();

}catch (Class NotFoun dEx cepti on cnf ){

cnf .p rint Stack T race ();

}catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b3) // ADD USER {

try {

String s,s1,s2,s3,s4,s5; s4=" false " ; s5=" false " ;

Page 92: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 92/197

int i=0 ; char[] pas ,pas 1; s=t.get T ext(); pas =p. get Pass wor d() ; pas 1= p1.get P ass wor d() ;

boolean check = A rrays .equals (pas ,pas 1) ; s1= t1.get T ext(); s2= t2.get T ext(); if (check == true && p as .length> 7)

{

JO pti onP ane .sh owM essage Dial og(f m1,"V ali d P ass wor d") ;

s3= ne w S tring (pas );

if ((s.equals (""))||( s1.equals (""))||( s2.equals (""))){

JO pti onPane .sh owM essage Dial og(f m1," fill all

te xtfiel ds correctly! ") ; }

else if (s2.length ()< 9){

JO pti onP ane .sh owM essage Dial og(f m1," fill mo bile nu mber correctly! ") ;

t2.set T ext(null ); }else {

Class .f or Nam e(d river );

Page 93: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 93/197

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

st .execute Update ("INSERTINTO user VALUES('"+ s+"','"+ s3+"','"+ s1+"','"+ s2+"','"+ s4+"','"+ s5+"',"+i+")") ;

con .close();

JO pti onP ane .sh owM essage Dial og(f m1," rec or dentere d") ;

f m1.set Visible (false ); }

}else {

JO pti onP ane .sh owM essage Dial og(f m1,"I nvali dPass wor d ( length m ust be greater than 7) ") ;

}}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

Page 94: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 94/197

if (e.get Source ()== b29) // Ed it USER {

try

{ String s0,s,s1,s2,s3,s4,s5; int i=0 ; s4=" false " ; s5=" false " ; char[] pas ,pas 1; s0= t15.get T ext(); s=t16.get T ext(); pas =p3.get Pass wor d() ; pas 1= p4. get P ass wor d() ; boolean check = A rrays .equals (pas ,

pas 1) ; s1= t17.get T ext(); s2= t18.get T ext(); if (check == true && p as .length> 7)

{

JO pti onP ane .sh owM essage Dial og(f m8 ,"V ali d P ass wor d") ;

s3= ne w S tring (pas );

if ((s.equals (""))||( s1.equals (""))||( s2.equals (""))){

JO pti onPane .sh owM essage Dial og(f m8 ," fill all te xtfiel ds correctly! ") ;

}else if (s2.length ()< 9){

Page 95: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 95/197

JO pti onP ane .sh owM essage Dial og(f m8 ," fill mo bile nu mber correctly! ") ;

t2.set T ext(null ); }

else {Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

st .execute Update ("UPDATE user set ui d='"+ s+"', pass wor d='"+ s3+"', add rs ='"+ s1+"',mo bile ='"+ s2+"', status ='"+ s4+"', rec or d='"+ s5+"',cre dit ="+ i+" w here ui d='"+ s0+"'") ;

con .close();

JO pti onP ane .sh owM essage Dial og(f m8 ," rec or dentere d") ;

f m8. set Visible (false ); }

}else {

JO pti onP ane .sh owM essage Dial og(f m8 ,"I nvali dPass wor d ( length m ust be greater than 7) ") ;

}}

Page 96: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 96/197

catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se)

{ se.p rint Stack T race (); }

}if (e.get Source ()== b15) // Ad m in login

{ad min (); }

if (e.get Source ()== b13) // ADD Cassette {

try {

String s,s1,s2,s3,s4; int i,i1; s=t4.get T ext();

s1= t5.get T ext(); s2= t6.get T ext(); s3= t7.get T ext();

s4=gr oup. get Selecti on().get Acti onC omm an d() ; i=I nteger .p arse Int (s2) ; i1=I nteger .p arse Int (s3) ;

if ((s.equals (""))||( s1.equals (""))||( s2.equals (""))||( s3.equals("")))

{

JO pti onPane .sh owM essage Dial og(f m3," fill all te xtfiel ds correctly! ") ;

Page 97: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 97/197

}

else {

Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

st .execute Update ("INSERTINTO cas VALUES('"+ s+"','"+ s1+"',"+ i+","+ i1+",'"+ s4+"')") ;

con .close();

JO pti onP ane .sh owM essage Dial og(f m3," rec or dentere d") ;

f m3.set Visible (false ); }

}

catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b2)

Page 98: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 98/197

{f m. set Visible (false );

}if (e.get Source ()== b32){

f m9. set Visible (false ); }if (e.get Source ()== b30){

f m8. set Visible (false ); }if (e.get Source ()== b17){

f m4. set Visible (false ); }if (e.get Source ()== b35){

f m10 .set Visible (false ); }

if (e.get Source ()== b34) //d isable user {

try {String s1,s2,s; s="d is" ; s1= t20 .get T ext(); Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st ,st 1; st = con .create State m ent (); st 1= con .create State m ent ();

Page 99: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 99/197

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user " ) ;

while (res .ne xt()){

s2= res .get String (" ui d") ;

if ((s1.equals (s2))){st 1.execute Update (" up date

user set status ='"+ s+"' w here ui d='"+ s1+"' ") ;

JO pti onPane .sh owM essage Dial og(f m10,"S uccessfully Done! ") ;

f m10 .set Visible (false ); }

}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race ();

}catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b36) //enable user {

try {String s1,s2,s; s=" false " ; s1= t21 .get T ext();

Page 100: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 100/197

Class .f or Nam e(d river ); con =

(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st ,st 1;

st = con .create State m ent (); st 1= con .create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user " ) ; while (res .ne xt()){

s2= res .get String (" ui d") ; if ((s1.equals (s2)))

{st 1.execute Update (" up date

user set status ='"+ s+"' w here ui d='"+ s1+"' ") ;

JO pti onPane .sh owM essage Dial og(f m11,"S uccessfully Done! ") ;

f m11 .set Visible (false );

}}

con.close(); }

catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b12) // user L og O ut

Page 101: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 101/197

{try {String s2,s3; s2=" false " ;

s3=" true " ; Class .f or Nam e(d river ); con =

(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st ,st 1; st = con .create State m ent (); st 1 = con .create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user where status ='"+ s3+"'" ) ;

while (res .ne xt()){

//s1= res .get String (" status ") ; st 1.execute Update (" update user

set status ='"+ s2+"' ") ;

JO pti onPane .sh owM essage Dial og(f m2,"S uccessfully L og O ut ") ;

f m2.set Visible (false ); vdo v1= ne w vdo(); break;

}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race ();

Page 102: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 102/197

}catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b4){

f m1.set Visible (false ); }if (e.get Source ()== b14){

f m3.set Visible (false ); }

if (e.get Source ()== b1) //user login {

try {String s,s1,s2,s3,s4,s5,s6;

s4=" true " ; s6="d is" ; s=t3.get T ext(); //ui dchar[] pas; pas =p2.get Pass wor d() ; s3= ne w S tring (pas ); Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st ,st 1; st = con .create State m ent (); st 1 = con .create State m ent ();

Page 103: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 103/197

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user where ui d='"+ s+"'" ) ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" pass wor d") ; s5=res .get String (" status ") ; if ((s.equals (""))||( s3.equals ("")))

{

JO pti onPane .sh owM essage Dial og(f m1," fill all te xtfiel ds correctly! ") ;

break; }

else if (s5.equals (s6) || ( s5.equals (s4))){

JO pti onP ane .sh owM essage Dial og(f m1," Can ' t access acc ount .\nC ontact Ad m inistrat or !") ;

break; }if (s3.equals (s2) && ( s.equals (s1))){

JO pti onP ane .sh owM essage Dial og(f m,"A uth orise d") ; st 1.execute Upd ate (" update user set

status ='"+ s4+"' w here ui d='"+ s+"' &&pass wor d='"+ s3+"'") ;

f m. set Visible (false ); v2() ; break; }else

Page 104: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 104/197

{

JO pti onP ane .sh owM essage Dial og(f m," not Auth orise d") ;

break;

}}con.close(); }catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b5) // id avail .

{try {

String s1,s2; s1= t.get T ext(); Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con .create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user " ) ; while (res .ne xt())

Page 105: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 105/197

{s2= res .get String (" ui d") ;

if ((s1.equals (s2))){

JO pti onP ane .sh owM essage Dial og(f m1,"E nter Another ID") ;

}else {

JO pti onP ane .sh owM essage Dial og(f m1, "ID is Available ") ;

break; }

}con.close();

}catch (Class NotFoun dEx cepti on cnf )

{cnf .p rint Stack T race ();

}catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b28) // (edit ) user idavailability

{try

Page 106: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 106/197

{String s,s1,s2; s=t15.get T ext(); s1= t16.get T ext(); Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con .create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user " ) ; while (res .ne xt()){

s2= res .get String (" ui d") ;

if ((s1.equals (s))){

JO pti onP ane .sh owM essage Dial og(f m8 ,"S am e ID") ;

}else if (s1.equals (s2)){

JO pti onP ane .sh owM essage Dial og(f m8 , "E nter Another ID") ;

break;

}else {

Page 107: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 107/197

Page 108: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 108/197

else if (s.equals ("")){

JO pti onPane .sh owM essage Dial og(f m4 ," pls fill all fiel ds ") ;

}else {

JO pti onPane .sh owM essage Dial og(f m4 ,"w r ong pass wor d") ;

}f m4. set Visible (false );

}if (e.get Source ()== b23){

f m4. set Visible (false ); f m5. set Visible (false );

}

if (e.get Source ()== b19){

editcas (); }if (e.get Source ()== b39){

inf o(); }if (e.get Source ()== b25){

f m6. set Visible (false ); }if (e.get Source ()== b27){

Page 109: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 109/197

f m7. set Visible (false ); }if (e.get Source ()== b37){

f m11 .set Visible (false );

}if (e.get Source ()== b24){

try {

String s0,s,s1,s2,s3,s4; int i,i1; s0= t13 .get T ext(); s=t9.get T ext(); s1= t10 .get T ext(); s2= t11 .get T ext(); s3= t12 .get T ext();

s4=gr oup1.get Selecti on().get Acti onC omm an d() ; i=I nteger .p arse Int (s2) ;

i1=I nteger .p arse Int (s3) ;

if ((s.equals (""))||( s1.equals (""))||( s2.equals (""))||( s3.equals("")))

{

JO pti onPane .sh owM essage Dial og(f m6 ," fill all te xtfiel ds correctly! ") ;

}

else {

Class .f or Nam e(d river );

Page 110: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 110/197

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State ment st; st = con.create State m ent ();

st .execute Update (" update cas set id='"+ s+"', na m e='"+ s1+"', cop ies="+ i+", cost ="+ i1+",tag ='"+ s4+"' w here id='"+ s0+"'") ;

con .close();

JO pti onP ane .sh owM essage Dial og(f m6 ," rec or dup date d") ;

f m6. set Visible (false ); }

}

catch (Class NotFoun dEx cepti on cnf )

{cnf .p rint Stack T race ();

}catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b31){

try {

Page 111: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 111/197

String s1; s1 = t19.get T ext(); Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p as

s); State m ent st; st = con.create State m ent (); st .execute Update ("d elete fr om

user where ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m9 ," rec or ddelete d") ;

f m9. set Visible (false ); con.close();

}catch (Class NotFoun dEx cepti on cnf ){

cnf .p rint Stack T race ();

}catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b52) //ISSUE

{try {

String s1,s2,s3,s4,s5,s6,s7; s4=" true " ; int i,i1,bill , j; s6=t22 .get T ext();

Page 112: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 112/197

Class .f or Nam e(d river ); con =

(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st;

if (s6.equals ("")){

JO pti onPane .sh owM essage Dial og(f m16,"P ls. enter the code") ;

}else {st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where cas .id='"+ s6+"' && user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s7=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m16,"P ls. return

Page 113: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 113/197

alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0)) {i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate

user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m16," Cassette "+ s7+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m16, " out of st ock ") ; break;

}

Page 114: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 114/197

}con.close();

}}

catch (Class NotF oun dEx cepti on cnf ){cnf .p rint Stack T race ();

}catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b51) //R eturn {

try {

String s1,s2,s3,s4,s5,s7;

s4=" false " ; String s6=" true " ; int i,i1,i2; double bill , j; i2=0 ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st =null; st = con.create State m ent (); R esult Set res = null; res =

(R esult Set )st .execute Q uery ("SELE C T * FROM user ,

Page 115: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 115/197

cas , issue where user .ui d= issue .ui d &&cas .id= issue .id") ;

if (res .ne xt()!=false ){

s1= res .get String (" ui d") ;

s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; j=res .get Int (" cre d it ") ; s7=res .get String (" na m e") ;

if (s2.equals (s6)&&(s5.equals (s6)))

{t22 .set T ext(s3) ; i1= i+1 ; bill = j+( j*(0.04)); State m ent s,sa ,sb; s=

con.create State ment ();

sa =con.create State ment ();

sb =con .create State m ent ();

s.execute Up date (" upd ate cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date ("d elete fr om issue where ui d='"+ s1+"'") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ i2+" w here ui d='"+ s1+"'") ;

Page 116: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 116/197

JO pti onP ane .sh owM essage Dial og(f m16," Cassette R eturne d "+ s7);

JO pti onP ane .sh owM essage Dial og(f m16,"B ill: R s

"+ bill );

}}

else {

JO pti onP ane .sh owM essage Dial og(f m16,"N othing to return ") ;

}

con.close(); }

catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b40) //R eturn {

try {

Page 117: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 117/197

String s1,s2,s3,s4,s5,s7; s4=" false " ; String s6=" true " ; int i,i1,i2; double bill , j;

i2=0 ; Class .f or Nam e(d river ); con =

(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st =null; st = con.create State m ent (); R esult Set res = null; res =

(R esult Set )st .execute Q uery ("SELE C T * FROM user ,cas , issue where user .ui d= issue .ui d &&cas .id= issue .id") ;

if (res .ne xt()!=false ){

s1= res .get String (" ui d") ;

s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; j=res .get Int (" cre d it ") ; s7=res .get String (" na m e") ;

if (s2.equals (s6)&&(s5.equals (s6)))

{i1= i+1 ; bill = j+( j*(0.04)); State m ent s,sa ,sb; s=

con.create State ment ();

Page 118: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 118/197

sa =con.create State ment ();

sb =con .create State m ent ();

s.execute Update (" upd ate cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date ("d elete

fr om issue where ui d='"+ s1+"'") ; sb .execute Update (" u pdate

user set rec or d='"+ s4+"', cre d it ="+ i2+" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m2," Cassette R eturne d "+ s7);

JO pti onP ane .sh owM essage Dial og(f m2,"B ill : R s "+ bill );

}}

else {

JO pti onP ane .sh owM essage Dial og(f m2,"N othing to return ") ;

}

con.close(); }catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race ();

Page 119: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 119/197

}catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b6) //ISSUEon butt on click m unna bhai

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="100 4" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p as

s); State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ;

Page 120: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 120/197

s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m2,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment ();

sa =con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate

user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m2," Cassette "+ s6+" issue d to: "+ s1);

Page 121: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 121/197

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m2, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b44 ) //ISSUE

on butt on click m unna bhai {

try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="100 4" ; Class .f or Nam e(d river );

Page 122: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 122/197

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m12,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1;

Page 123: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 123/197

State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate

user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m12," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m12, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race ();

Page 124: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 124/197

}catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b7) //ISSUEon butt on click heyy babby

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="100 5" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p as

s); State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ;

Page 125: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 125/197

s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m2,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment ();

sa =con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate

user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m2," Cassette "+ s6+"issue d to: "+ s1);

Page 126: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 126/197

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m2, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b46 ) //ISSUE

on butt on click heyy babby {

try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="100 5" ; Class .f or Nam e(d river );

Page 127: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 127/197

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m12,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;;

Page 128: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 128/197

s=con.create State ment ();

sa =con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m12," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0)

{

JO pti onP ane .sh owM essage Dial og(f m12, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

Page 129: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 129/197

se.p rint Stack T race (); }

}

if (e.get Source ()== b8) //ISSUE

on butt on click jm d{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="3003" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ;

Page 130: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 130/197

s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m2,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate

user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m2," Cassette "+ s6+"issue d to: "+ s1);

break; }

Page 131: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 131/197

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m2, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b9) //ISSUEon butt on click shreya gh oshal

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1=" 4005" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

Page 132: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 132/197

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m2,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment ();

Page 133: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 133/197

sa =con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m2," Cassette "+ s6+"issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m2, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

Page 134: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 134/197

se.p rint Stack T race (); }

}

if (e.get Source ()== b10) //ISSUE

on butt on click enrique {try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1=" 4002" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ;

Page 135: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 135/197

s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m2,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate

user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m2," Cassette "+ s6+"issue d to: "+ s1);

break; }

Page 136: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 136/197

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m2, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b11) //ISSUEon butt on click shakira

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1=" 4001" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

Page 137: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 137/197

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ; if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m2,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

Page 138: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 138/197

sb =con .create State m ent ();

s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m2," Cassette "+ s6+"issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m2, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

Page 139: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 139/197

}if (e.get Source ()== b41) //ISSUE

on butt on click phir hera pheri {

try

{ String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="1002" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4))

Page 140: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 140/197

{

JO pti onP ane .sh owM essage Dial og(f m12,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m12," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

Page 141: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 141/197

JO pti onP ane .sh owM essage Dial og(f m12, " out of st ock ") ;

break; }

}

con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b42) //ISSUE

on butt on click kal h o na ho

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="1003" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

Page 142: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 142/197

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt())

{

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m12,"P ls. return

alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

Page 143: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 143/197

sb =con .create State m ent ();

s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m12," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m12, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

Page 144: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 144/197

}if (e.get Source ()== b43) //ISSUE

on butt on click om shanti om {

try

{ String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="1001" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4))

Page 145: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 145/197

{

JO pti onP ane .sh owM essage Dial og(f m12,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m12," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

Page 146: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 146/197

JO pti onP ane .sh owM essage Dial og(f m12, " out of st ock ") ;

break; }

}

con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b44 ) //ISSUEon butt on click krrish

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="100 6" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

Page 147: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 147/197

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m12,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment ();

Page 148: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 148/197

sa =con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m12," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m12, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

Page 149: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 149/197

se.p rint Stack T race (); }

}

if (e.get Source ()== b71) //ISSUE

on butt on click titanic {try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="2001" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ;

Page 150: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 150/197

s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m13,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate

user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m13," Cassette "+ s6+" issue d to: "+ s1);

break; }

Page 151: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 151/197

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m13, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b72) //ISSUEon butt on click the m u mm y

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="2002" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

Page 152: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 152/197

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m13,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment ();

Page 153: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 153/197

sa =con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m13," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m13, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

Page 154: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 154/197

se.p rint Stack T race (); }

}

if (e.get Source ()== b53) //ISSUE

on butt on click the shaggy dog {try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="200 5" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ;

Page 155: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 155/197

s6=res .get String (" na m e") ; if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m13,"P ls. return

alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ; break;

}if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent ();

s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m13," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0)

Page 156: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 156/197

{

JO pti onP ane .sh owM essage Dial og(f m13, " out of st ock ") ; break;

}

}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b54 ) //ISSUEon butt on click failure to launch

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="200 6" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

Page 157: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 157/197

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m13,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment ();

Page 158: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 158/197

sa =con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m13," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m13, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

Page 159: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 159/197

se.p rint Stack T race (); }

}

if (e.get Source ()== b55 ) //ISSUE

on butt on click p irates of carribean {try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="2003" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ;

Page 160: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 160/197

s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m13,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate

user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m13," Cassette "+ s6+" issue d to: "+ s1);

break; }

Page 161: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 161/197

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m13, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}

if (e.get Source ()== b56 ) //ISSUEon butt on click m i3

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="200 4" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

Page 162: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 162/197

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m13,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment ();

Page 163: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 163/197

sa =con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m13," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m13, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

Page 164: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 164/197

Page 165: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 165/197

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m14,"P ls. return

alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ; break;

}if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent ();

s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m14," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0)

Page 166: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 166/197

{

JO pti onP ane .sh owM essage Dial og(f m14, " out of st ock ") ; break;

}

}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b58 ) //ISSUE

on butt on click om {

try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="300 6" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st;

Page 167: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 167/197

st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m14,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

Page 168: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 168/197

sb =con .create State m ent ();

s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m14," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m14, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

Page 169: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 169/197

}if (e.get Source ()== b59 ) //ISSUE

on butt on click ganesh {

try

{ String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="3002" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4))

Page 170: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 170/197

{

JO pti onP ane .sh owM essage Dial og(f m14,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m14," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

Page 171: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 171/197

JO pti onP ane .sh owM essage Dial og(f m14, " out of st ock ") ;

break; }

}

con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b60) //ISSUE

on butt on click gayatri m antra

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="300 5" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

Page 172: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 172/197

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt())

{

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m14,"P ls. return

alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

Page 173: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 173/197

sb =con .create State m ent ();

s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m14," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m14, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

Page 174: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 174/197

}if (e.get Source ()== b61) //ISSUE

on butt on click jm d{

try

{ String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="3003" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4))

Page 175: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 175/197

{

JO pti onP ane .sh owM essage Dial og(f m14,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m14," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

Page 176: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 176/197

JO pti onP ane .sh owM essage Dial og(f m14, " out of st ock ") ;

break; }

}

con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b62) //ISSUE

on butt on click guru sahib

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1="300 4" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

Page 177: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 177/197

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt())

{

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m14,"P ls. return

alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

Page 178: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 178/197

sb =con .create State m ent ();

s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m14," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m14, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

Page 179: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 179/197

}

if (e.get Source ()== b63) //ISSUEon butt on click enrique

{

try {String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1=" 4002" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where

user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

Page 180: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 180/197

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m15,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne w

cassette .") ; break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ; sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate

user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m15," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

Page 181: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 181/197

JO pti onP ane .sh owM essage Dial og(f m15, " out of st ock ") ;

break; }

}

con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b64 ) //ISSUE on

butt on click lata

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1=" 4004" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

Page 182: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 182/197

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt())

{

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m15,"P ls. return

alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

Page 183: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 183/197

sb =con .create State m ent ();

s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m15," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m15, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

Page 184: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 184/197

}if (e.get Source ()== b65 ) //ISSUE

on butt on click shreya {

try

{ String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1=" 4005" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4))

Page 185: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 185/197

{

JO pti onP ane .sh owM essage Dial og(f m15,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m15," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

Page 186: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 186/197

JO pti onP ane .sh owM essage Dial og(f m15, " out of st ock ") ;

break; }

}

con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b66 ) //ISSUE

on butt on click shakira

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1=" 4001" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

Page 187: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 187/197

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt())

{

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m15,"P ls. return

alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

Page 188: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 188/197

sb =con .create State m ent ();

s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m15," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m15, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

Page 189: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 189/197

}if (e.get Source ()== b67 ) //ISSUE

on butt on click sonu {

try

{ String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1=" 4006" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent (); R esult Set res = (R esult Set )

st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt()){

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4))

Page 190: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 190/197

{

JO pti onP ane .sh owM essage Dial og(f m15,"P ls. return alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

sb =con .create State m ent (); s.execute Update (" up date

cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert int o issue values ('"+ s1+"','"+ s3+"')") ;

sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m15," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

Page 191: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 191/197

JO pti onP ane .sh owM essage Dial og(f m15, " out of st ock ") ;

break; }

}

con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

}if (e.get Source ()== b68 ) //ISSUE

on butt on click bryan ada m s

{try {

String s1,s2,s3,s4,s5,s6; s4=" true " ; int i,i1,bill , j; String z1; z1=" 4003" ; Class .f or Nam e(d river );

con =(C onnecti on)Driver M anager .getC onnecti on(url ,user ,p ass);

State m ent st; st = con.create State m ent ();

Page 192: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 192/197

R esult Set res = (R esult Set )st .execute Q uery ("SELE C T * FROM user , cas where user .status ='"+ s4+"' ") ;

while (res .ne xt())

{

s1= res .get String (" ui d") ; s2= res .get String (" status ") ; s3= res .get String (" id") ; i=res .get Int (" cop ies") ; s5=res .get String (" rec or d") ; bill =res .get Int (" cost ") ; j=res .get Int (" cop ies") ; s6=res .get String (" na m e") ;

if (s5.equals (s4)){

JO pti onP ane .sh owM essage Dial og(f m15,"P ls. return

alrea dy issue d cassete \n O nly then u can issue ne wcassette .") ;

break; }if (s2.equals (" true ")

&&( j> 0) &&( s3.equals (z1))){

i1= i-1; State m ent s,sa ,sb;; s=

con.create State ment (); sa =

con.create State ment ();

Page 193: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 193/197

sb =con .create State m ent ();

s.execute Update (" up date cas set cop ies ="+ i1+" w here id='"+ s3+"'") ;

sa .execute Up date (" insert

int o issue values ('"+ s1+"','"+ s3+"')") ; sb .execute Update (" u pdate user set rec or d='"+ s4+"', cre d it ="+ bill +" w here ui d='"+ s1+"'") ;

JO pti onP ane .sh owM essage Dial og(f m15," Cassette "+ s6+" issue d to: "+ s1);

break; }

else if ( j==0){

JO pti onP ane .sh owM essage Dial og(f m15, " out of st ock ") ; break;

}}con.close();

}catch (Class NotF oun dEx cepti on cnf ){

cnf .p rint Stack T race (); }catch (SQLEx cepti on se){

se.p rint Stack T race (); }

Page 194: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 194/197

}

}}

Page 195: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 195/197

Page 196: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 196/197

CONCLUSION

This project is designed to meet the requirements of the users. The software project is very big and

includes almost all the ways of video library management. It has been developed in JAVA keeping in mind

the specifications of the system.

Overall the project teaches us the essential skills like:

Using system analysis and design techniques like data flow diagram in designing the system.

Understanding the database handling and query processing using My SQL.

Page 197: Project 4 5th Sem FfT

8/3/2019 Project 4 5th Sem FfT

http://slidepdf.com/reader/full/project-4-5th-sem-fft 197/197

SCOPE OF FUTURE APPLICATION

This project can be used in the Libraries with adding some more useful modules in the project.

Utmost care and back-up procedures must be established to ensure 100% successfulimplementation of the video Library Management System.

In case of system failure, the organization should be in a position to process thetransaction with another organization or if the worst comes to the worst, it should be in a

i i l i ll