Professional Documents
Culture Documents
BACHELOR OF ENGINEERING
In
IMIGRATION
SIGNATURE
SIGNATURE
Mrs.S.V.PRIYA M.E
HEAD OF THE DEPARTMENT
COMPUTER SCIENCE AND ENGINEERING
Ms.M.SARANYA B.E
SUPERVISOR
COMPUTER SCIENCE AND ENGINEERING
ACKNOWLEDGEMENT
We would like to thank the management and principals for their encouragement in doing this project.
It is our first and foremost duty to express our heartily gratitude and allegiance to Mrs.S.V.PRIYA M.E., Head of the Department of Computer Science and engineering for her sustained help, guidance and encouragement in doing this project and making this a successful one.
We also convey our sincere thanks to Ms.M.SARANYA B.E for his valuable suggestions throughout the duration of this project by being our internal guide.
Finally we would like to thank all the technical and non technical faculties and our friends for extending a helping hand by means of providing necessary information and their sustained interest in our part of fruitful completion.
ABSTRACT
This mini project is about PASSPORT IMIGRATION
MANAGEMENT, means the client to apply for the passport for the particular application form and the applicant makes the payment for his application that are systematically developed in the project. In this project the design is made with the help of javax.swing. Swing is the latest technology in java its help to design the outer look of the frame. Admin will acknowledge the applicant .The applicant gets the passport. If it is expired he has to renew the passport. The details of the passport can be viewed by giving the passport number The client to apply for the passport for the particular application form and the applicant makes the payment for his application. They too send message to the users. In the designs are made easy and its are looking very nice and the coding is very simple no need of applet viewer to show the output. For this project we made the name as PASSPORT IMIGRATION MANAGEMENT, this is very simple to use by clicking the buttons to pay the amountand send the message to users.
TABLE OF CONTENTS
CHAPTER NO: TITLE
3.
MODULE DESCRIPTION
4.
UML DIAGRAMS a.USE CASE DIAGRAM b.ACTIVITY DIAGRAM c.SEQUENCE DIAGRAM d.COLLABORATION DIAGRAM e.CLASS DIAGRAM f.COMPONENT DIAGRAM
5.
6.
CONCLUSION
7.
PROBLEM DEFINITION:
The client to apply for the passport for the particular application form and the applicant makes the payment for his application. Admin will acknowledge the applicant .The applicant gets the passport. If it is expired he has to renew the passport. The details of the passport can be viewed by giving the passport number.
SOFTWARE DESCRIPTION:
MODULE DESCRIPTION:
APPLICATION PANEL:
In this panel, the applicant should submit the details about his address, town, city, state, nationality, email, phone number to the admin. The admin will acknowledge the applicant.
RENEW PANEL:
In this panel , the applicant should submit the renew details to renew his passport. The admin will acknowledge the applicant.
PAYMENT PANEL:
In this panel, the payment for the application form/renewal form is made by the applicant to the admin.
VIEW PANEL: In this panel, the details for the particular passport number is displayed.
UML DIAGRAMS:
apply passport
make payment
acknowledge
applicant
renew passport
admin
show details
ACTIVITY DIAGRAM:
The activity diagram describes the sequencing of activities, with support for both conditional and parallel behavior. The various controls are placed into the diagram window to create activity diagram
make payment
view details
SEQUENCE DIAGRAM:
Create a new package from the database and name it as a sequence diagram Form the toolbar, select the required tools and make corresponding connections.
: applicant
application
renewal
payment
database
COLLABORATION DIAGRAM:
Press F5 on the sequence diagram the collaboration diagram is obtained Save the diagram.
2: 6: 5: 1: 8:
databas e
4: 9: : applicant
CLASS DIAGRAM:
COMPONENT DIAGRAM:
Create a new package from the database and name it as a component diagram Generate the coding using visual basic
CODE:
import javax.swing.*; import javax.swing.ImageIcon; import java.awt.*; import java.awt.Color; import java.awt.Image; import java.awt.event.*; import java.sql.*; import java.util.*; public class passport1 { public static void main(String[] args) { Home h=new Home(); h.setTitle("PASSPORT AUTOMATION SYSTEM"); h.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); h.pack(); h.setSize(850,735); h.setVisible(true); } } class Home extends JFrame implements ActionListener
{ public PreparedStatement ps=null,ps1=null,ps2=null,ps3=null,ps4=null; public ResultSet rs; public Connection con; public Statement st; JLabel fname2,passno2,form1,lname2,gender2,addr2,country2,email2,phno2,formrenew; private JButton home,view,renew,payment; JPanel p,p1,p2,p3,p4,p5,p6,p7,pay,renewpanel,payrenew; JScrollPane sp; JButton click,apply,back,submit,clear,cancel,back1,search,back2,backpay,backview,renewsubmit,renewclear, renewcancel,renewback,paymentrenew,backrenewpay; int x,y,te,i=1000,n,bal,j; public String sd="",sel="",ba=""; JTextField fnam,lnam,gen1,age1,addr1,town1,city1,state1,nation1,email1,ph1,passno,accnotext,formtext,nam erenew,passportrenew,renewaccnotext,emailrenew,phrenew,renewformtext; public Home() { try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:passportautomation","pass","pass"); st=con.createStatement(); } catch(Exception e) { } /*FIRST PAGE*/ p1=new JPanel(); p=new JPanel(); System.out.println(e);
Font f=new Font("Comic Sans MS",Font.BOLD,36); p.setLayout(null); p.setBackground(Color.BLACK); p.setSize(200,200); JLabel l2=new JLabel("PASSPORT AUTOMATION SYSTEM",0); l2.setFont(f); l2.setBounds(50,20,700,40); l2.setForeground(Color.ORANGE); p.add(l2); JLabel l=new JLabel("GOVERMENT OF INDIA",0); l.setFont(f); l.setBounds(89,90,600,40); l.setForeground(Color.WHITE); JLabel li=new JLabel(" MINISTRY OF EXTERNAL AFFAIRS",0); li.setFont(f); li.setBounds(60,150,700,40); li.setForeground(Color.GREEN); p.add(l); p.add(li); ImageIcon w=new ImageIcon("Emblem.jpg"); JLabel image=new JLabel(w); image.setBounds(320,250,200,155); p.add(image); ImageIcon w1=new ImageIcon("Play.png"); click=new JButton(w1); click.setBackground(Color.BLACK); click.setBounds(390,450,55,55);
click.setActionCommand("NEXT"); click.addActionListener(this); p.add(click); JLabel cli=new JLabel("Click Here",0); cli.setBounds(390,500,60,40); cli.setForeground(Color.WHITE); p.add(cli); add(p); p1=new JPanel(); p1.setLayout(new BorderLayout()); p2=new JPanel(); p1.add(p2,BorderLayout.WEST); p2.setBackground(Color.BLACK); p2.setLayout(new GridLayout(4,1)); ImageIcon w2=new ImageIcon("Passport.jpg"); JLabel im=new JLabel(w2); im.setBounds(120,50,15,15); p2.add(im); ImageIcon w3=new ImageIcon("apply1.png"); apply=new JButton("Apply",w3); apply.setBackground(Color.BLACK); apply.setBounds(10,100,20,20); apply.setActionCommand("APPLY"); apply.setForeground(Color.WHITE); apply.addActionListener(this); p2.add(apply); ImageIcon w4=new ImageIcon("renew.gif");
renew=new JButton("Renew",w4); renew.setBackground(Color.BLACK); renew.setBounds(10,100,20,20); renew.setForeground(Color.WHITE); renew.setActionCommand("RENEW"); renew.addActionListener(this); p2.add(renew); ImageIcon w5=new ImageIcon("view1.gif"); view=new JButton("View",w5); view.setBackground(Color.BLACK); view.setBounds(10,100,20,20); view.setForeground(Color.WHITE); view.setActionCommand("VIEW"); view.addActionListener(this); p2.add(view); /*BUTTONS*/ p3=new JPanel(); p1.add(p3,BorderLayout.CENTER); p3.setBackground(Color.WHITE); p3.setLayout(new GridLayout(6,1)); p3.setSize(200,12); JLabel con=new JLabel("CONTACT",0); con.setFont(f); con.setBounds(0,20,700,40); con.setForeground(Color.BLACK); p3.add(con); JLabel con1=new JLabel("Regional Passport Office",0);
Font f1=new Font("Comic Sans MS",Font.BOLD,20); con1.setFont(f1); con1.setBounds(0,5,700,10); con1.setForeground(Color.BLACK); p3.add(con1); JLabel con2=new JLabel("Shastri Bhavan",0); con2.setFont(f1); con2.setBounds(0,20,700,40); con2.setForeground(Color.BLACK); p3.add(con2); JLabel con3=new JLabel("26 Haddows Road , Nungambakkam",0); con3.setFont(f1); con3.setBounds(0,20,700,40); con3.setForeground(Color.BLACK); p3.add(con3); JLabel con4=new JLabel("Chennai-600 006",0); con4.setFont(f1); con4.setBounds(0,20,700,40); con4.setForeground(Color.BLACK); p3.add(con4); ImageIcon w6=new ImageIcon("back.jpg"); back=new JButton("Back",w6); back.setBackground(Color.WHITE); back.setBounds(10,100,20,20); back.setActionCommand("BACK"); back.addActionListener(this); p3.add(back);
/*APPLY*/ p4=new JPanel(); p4.setLayout(new BorderLayout()); p4.setBackground(Color.BLACK); JPanel p41=new JPanel(); p4.add(p41,BorderLayout.NORTH); JLabel app=new JLabel("APPLICATION FORM",0); app.setFont(f1); app.setBounds(0,5,700,10); app.setForeground(Color.BLACK); p41.add(app); JPanel p42=new JPanel(); p4.add(p42,BorderLayout.CENTER); p42.setLayout(null); p42.setBackground(Color.BLACK); x=200;y=30; Font f3=new Font("Comic Sans MS",Font.BOLD,20); JLabel form=new JLabel("Form No"); form.setFont(f3); form.setForeground(Color.WHITE); form.setBounds(590,10,300,25); p42.add(form); JLabel fname=new JLabel("First Name"); fname.setFont(f3); fname.setForeground(Color.WHITE); fname.setBounds(x,y,300,25);y+=50; p42.add(fname);
JLabel lname=new JLabel("Last Name"); lname.setForeground(Color.WHITE); lname.setFont(f3); lname.setBounds(x,y,300,25);y+=50; p42.add(lname); JLabel gen=new JLabel("Gender"); gen.setForeground(Color.WHITE); gen.setFont(f3); gen.setBounds(x,y,300,25);y+=50; p42.add(gen); JLabel age=new JLabel("Age"); age.setForeground(Color.WHITE); age.setFont(f3); age.setBounds(x,y,300,25);y+=50; p42.add(age); JLabel addr=new JLabel("Address"); addr.setForeground(Color.WHITE); addr.setFont(f3); addr.setBounds(x,y,300,25);y+=50; p42.add(addr); JLabel town=new JLabel("Town"); town.setForeground(Color.WHITE); town.setFont(f3); town.setBounds(x,y,300,25);y+=50; p42.add(town); JLabel city=new JLabel("City"); city.setForeground(Color.WHITE);
city.setFont(f3); city.setBounds(x,y,300,25);y+=50; p42.add(city); JLabel state=new JLabel("State"); state.setForeground(Color.WHITE); state.setFont(f3); state.setBounds(x,y,300,25);y+=50; p42.add(state); JLabel nation=new JLabel("Nationality"); nation.setForeground(Color.WHITE); nation.setFont(f3); nation.setBounds(x,y,300,25);y+=50; p42.add(nation); JLabel email=new JLabel("E-mail ID"); email.setForeground(Color.WHITE); email.setFont(f3); email.setBounds(x,y,300,25);y+=50; p42.add(email); JLabel ph=new JLabel("Phone No"); ph.setForeground(Color.WHITE); ph.setFont(f3); ph.setBounds(x,y,300,25);y+=50; p42.add(ph ); x=350;y=30; Random formno = new Random(); i = formno.nextInt(10000); form1=new JLabel("");
form1.setBounds(690,10,200,25); form1.setFont(f1); form1.setForeground(Color.WHITE); p42.add(form1); fnam=new JTextField("",5); fnam.setBounds(x,y,200,25);y+=50; p42.add(fnam); lnam=new JTextField("",5); lnam.setBounds(x,y,200,25);y+=50; p42.add(lnam); gen1=new JTextField("",5); gen1.setBounds(x,y,200,25);y+=50; p42.add(gen1); age1=new JTextField("",5); age1.setBounds(x,y,200,25);y+=50; p42.add(age1); addr1=new JTextField("",5); addr1.setBounds(x,y,200,25);y+=50; p42.add(addr1); town1=new JTextField("",5); town1.setBounds(x,y,200,25);y+=50; p42.add(town1); city1=new JTextField("",5); city1.setBounds(x,y,200,25);y+=50; p42.add(city1); state1=new JTextField("",5); state1.setBounds(x,y,200,25);y+=50;
p42.add(state1); nation1=new JTextField("",5); nation1.setBounds(x,y,200,25);y+=50; p42.add(nation1); email1=new JTextField("",5); email1.setBounds(x,y,200,25);y+=50; p42.add(email1); ph1=new JTextField("",5); ph1.setBounds(x,y,200,25);y+=50; p42.add(ph1); x=50; ImageIcon w7=new ImageIcon("submit.png"); submit=new JButton("Submit",w7); submit.setBackground(Color.BLACK); submit.setBounds(x,y,150,70);x+=200; submit.setForeground(Color.WHITE); submit.setActionCommand("SUBMIT"); submit.addActionListener(this); p42.add(submit); /*PAYMENT FOR APPLY*/ pay=new JPanel(); pay.setLayout(new BorderLayout()); pay.setBackground(Color.BLACK); JPanel paytitle=new JPanel(); pay.add(paytitle,BorderLayout.NORTH); JLabel paymen=new JLabel("E-PAYMENT",0); paymen.setFont(f1);
paymen.setBounds(0,5,700,10); paymen.setForeground(Color.BLACK); paytitle.add(paymen); JPanel paymentbody=new JPanel(); pay.add(paymentbody,BorderLayout.CENTER); paymentbody.setLayout(null); paymentbody.setBackground(Color.BLACK); JLabel formlabel=new JLabel("Form No:"); formlabel.setFont(f3); formlabel.setBounds(200,100,300,25); formlabel.setForeground(Color.WHITE); paymentbody.add(formlabel); formtext=new JTextField("",5); formtext.setBounds(500,100,200,25); paymentbody.add(formtext); JLabel accno=new JLabel("Enter your Bank Account No:"); accno.setFont(f3); accno.setBounds(200,200,300,25); accno.setForeground(Color.WHITE); paymentbody.add(accno); accnotext=new JTextField("",5); accnotext.setBounds(500,200,200,25); paymentbody.add(accnotext); ImageIcon payicon=new ImageIcon("rupee1.jpg"); payment=new JButton("",payicon); payment.setBackground(Color.BLACK); payment.setBounds(350,300,150,70);
payment.setActionCommand("PAY"); payment.addActionListener(this); paymentbody.add(payment); ImageIcon backicon=new ImageIcon("back1.png"); backpay=new JButton("Back",backicon); backpay.setForeground(Color.WHITE); backpay.setBackground(Color.BLACK); backpay.setBounds(550,300,150,70); backpay.setActionCommand("BACKPAY"); backpay.addActionListener(this); paymentbody.add(backpay); ImageIcon w8=new ImageIcon("clear.png"); clear=new JButton("Clear",w8); clear.setBackground(Color.BLACK); clear.setForeground(Color.WHITE); clear.setBounds(x,y,150,70);x+=200; clear.setActionCommand("CLEAR"); clear.addActionListener(this); p42.add(clear); ImageIcon w9=new ImageIcon("cancel.png"); cancel=new JButton("Cancel",w9); cancel.setBackground(Color.BLACK); cancel.setForeground(Color.WHITE); cancel.setBounds(x,y,150,70);x+=200; cancel.setActionCommand("CANCEL"); cancel.addActionListener(this); p42.add(cancel);
ImageIcon w10=new ImageIcon("back1.png"); back1=new JButton("Back",w10); back1.setForeground(Color.WHITE); back1.setBackground(Color.BLACK); back1.setBounds(x,y,150,70);x+=200; back1.setActionCommand("BACKO"); back1.addActionListener(this); p42.add(back1); /*RENEW*/ renewpanel=new JPanel(); renewpanel.setLayout(new BorderLayout()); renewpanel.setBackground(Color.BLACK); JPanel renewpanel1=new JPanel(); renewpanel.add(renewpanel1,BorderLayout.NORTH); JLabel ren=new JLabel("RENEWAL FORM",0); ren.setFont(f1); ren.setBounds(0,5,700,10); ren.setForeground(Color.BLACK); renewpanel1.add(ren); JPanel renewpanel2=new JPanel(); renewpanel.add(renewpanel2,BorderLayout.CENTER); renewpanel2.setLayout(null); renewpanel2.setBackground(Color.BLACK); x=200;y=150; JLabel form2=new JLabel("Form No"); form2.setFont(f3); form2.setForeground(Color.WHITE);
form2.setBounds(590,10,300,25); renewpanel2.add(form2); JLabel name=new JLabel("Name"); name.setFont(f3); name.setForeground(Color.WHITE); name.setBounds(x,y,300,25);y+=60; renewpanel2.add(name); JLabel passportno=new JLabel("Passport No"); passportno.setForeground(Color.WHITE); passportno.setFont(f3); passportno.setBounds(x,y,300,25);y+=60; renewpanel2.add(passportno); JLabel emaillabel=new JLabel("E-Mail"); emaillabel.setForeground(Color.WHITE); emaillabel.setFont(f3); emaillabel.setBounds(x,y,300,25);y+=60; renewpanel2.add(emaillabel); JLabel phlabel=new JLabel("Phone No"); phlabel.setForeground(Color.WHITE); phlabel.setFont(f3); phlabel.setBounds(x,y,300,25);y+=60; renewpanel2.add(phlabel); x=350;y=150; Random formno1 = new Random(); i = formno1.nextInt(100000); formrenew=new JLabel(""); formrenew.setBounds(690,10,200,25);
formrenew.setFont(f1); formrenew.setForeground(Color.WHITE); renewpanel2.add(formrenew); namerenew=new JTextField("",5); namerenew.setBounds(x,y,200,25);y+=60; renewpanel2.add(namerenew); passportrenew=new JTextField("",5); passportrenew.setBounds(x,y,200,25);y+=60; renewpanel2.add(passportrenew); emailrenew=new JTextField("",5); emailrenew.setBounds(x,y,200,25);y+=60; renewpanel2.add(emailrenew); phrenew=new JTextField("",5); phrenew.setBounds(x,y,200,25);y+=60; renewpanel2.add(phrenew);
x=50; ImageIcon renewsub=new ImageIcon("submit.png"); renewsubmit=new JButton("Submit",renewsub); renewsubmit.setForeground(Color.WHITE); renewsubmit.setBackground(Color.BLACK); renewsubmit.setBounds(x,500,150,70);x+=200; renewsubmit.setActionCommand("SUBMITRENEW"); renewsubmit.addActionListener(this); renewpanel2.add(renewsubmit); /*PAYMENT FOR RENEW*/
payrenew=new JPanel(); payrenew.setLayout(new BorderLayout()); payrenew.setBackground(Color.BLACK); JPanel payrenewtitle=new JPanel(); payrenew.add(payrenewtitle,BorderLayout.NORTH); JLabel renewpaymen=new JLabel("E-PAYMENT",0); renewpaymen.setFont(f1); renewpaymen.setBounds(0,5,700,10); renewpaymen.setForeground(Color.BLACK); payrenewtitle.add(renewpaymen); JPanel paymentrenewbody=new JPanel(); payrenew.add(paymentrenewbody,BorderLayout.CENTER); paymentrenewbody.setLayout(null); paymentrenewbody.setBackground(Color.BLACK); JLabel renewformlabel=new JLabel("Form No:"); renewformlabel.setFont(f3); renewformlabel.setBounds(200,100,300,25); renewformlabel.setForeground(Color.WHITE); paymentrenewbody.add(renewformlabel); renewformtext=new JTextField("",5); renewformtext.setBounds(500,100,200,25); paymentrenewbody.add(renewformtext); JLabel renewaccno=new JLabel("Enter your Bank Account No:"); renewaccno.setFont(f3); renewaccno.setBounds(200,200,300,25); renewaccno.setForeground(Color.WHITE); paymentrenewbody.add(renewaccno);
renewaccnotext=new JTextField("",5); renewaccnotext.setBounds(500,200,200,25); paymentrenewbody.add(renewaccnotext); ImageIcon payrenewicon=new ImageIcon("rupee1.jpg"); paymentrenew=new JButton("",payrenewicon); paymentrenew.setBackground(Color.BLACK); paymentrenew.setBounds(350,300,150,70); paymentrenew.setActionCommand("PAYRENEW"); paymentrenew.addActionListener(this); paymentrenewbody.add(paymentrenew); ImageIcon backrenewicon=new ImageIcon("back1.png"); backrenewpay=new JButton("Back",backicon); backrenewpay.setForeground(Color.WHITE); backrenewpay.setBackground(Color.BLACK); backrenewpay.setBounds(550,300,150,70); backrenewpay.setActionCommand("BACKRENEWPAY"); backrenewpay.addActionListener(this); paymentrenewbody.add(backrenewpay); ImageIcon renewcl=new ImageIcon("clear.png"); renewclear=new JButton("Clear",renewcl); renewclear.setBackground(Color.BLACK); renewclear.setForeground(Color.WHITE); renewclear.setBounds(x,500,150,70);x+=200; renewclear.setActionCommand("CLEARRENEW"); renewclear.addActionListener(this); renewpanel2.add(renewclear); ImageIcon renewca=new ImageIcon("cancel.png");
renewcancel=new JButton("Next",renewca); renewcancel.setBackground(Color.BLACK); renewcancel.setForeground(Color.WHITE); renewcancel.setBounds(x,500,150,70);x+=200; renewcancel.setActionCommand("CANCEL"); renewcancel.addActionListener(this); renewpanel2.add(renewcancel); ImageIcon renewba=new ImageIcon("back1.png"); renewback=new JButton("Back",renewba); renewback.setForeground(Color.WHITE); renewback.setBackground(Color.BLACK); renewback.setBounds(x,500,150,70);x+=200; renewback.setActionCommand("BACKRENEW"); renewback.addActionListener(this); renewpanel2.add(renewback); /*VIEW*/ p6=new JPanel(); p6.setLayout(new BorderLayout()); p6.setBackground(Color.BLACK); JPanel p61=new JPanel(); p6.add(p61,BorderLayout.NORTH); JLabel vie=new JLabel("VIEW",0); vie.setFont(f1); vie.setBounds(0,5,700,10); vie.setForeground(Color.BLACK); p61.add(vie); JPanel p62=new JPanel();
p6.add(p62,BorderLayout.CENTER); p62.setLayout(null); p62.setBackground(Color.BLACK); JLabel pass=new JLabel("Enter your Passport No:"); pass.setFont(f3); pass.setBounds(200,200,300,25); pass.setForeground(Color.WHITE); p62.add(pass); passno=new JTextField("",5); passno.setBounds(500,200,200,25); p62.add(passno);
ImageIcon w11=new ImageIcon("search.png"); search=new JButton("",w11); search.setBackground(Color.BLACK); search.setBounds(250,400,150,70); search.setActionCommand("SEARCH"); search.addActionListener(this); p62.add(search); ImageIcon w12=new ImageIcon("back1.png"); back2=new JButton("Back",w12); back2.setForeground(Color.WHITE); back2.setBackground(Color.BLACK); back2.setBounds(450,400,150,70); back2.setActionCommand("BACK2"); back2.addActionListener(this); p62.add(back2);
p7=new JPanel(); p7.setLayout(new BorderLayout()); p7.setBackground(Color.BLACK); JPanel p71=new JPanel(); p7.add(p71,BorderLayout.NORTH); JLabel sear=new JLabel("SEARCH RESULT",0); sear.setFont(f1); sear.setBounds(0,5,700,10); sear.setForeground(Color.BLACK); p71.add(sear); JPanel p72=new JPanel(); p7.add(p72,BorderLayout.CENTER); p72.setLayout(null); p72.setBackground(Color.BLACK); x=200;y=30; //Font f3=new Font("Comic Sans MS",Font.BOLD,20); JLabel passno1=new JLabel("Passport No"); passno1.setFont(f3); passno1.setForeground(Color.WHITE); passno1.setBounds(x,y,300,25);y+=60; p72.add(passno1); JLabel fnamelabel=new JLabel("First Name"); fnamelabel.setForeground(Color.WHITE); fnamelabel.setFont(f3); fnamelabel.setBounds(x,y,300,25);y+=60; p72.add(fnamelabel); JLabel lnamelabel=new JLabel("Last Name");
lnamelabel.setFont(f3); lnamelabel.setForeground(Color.WHITE); lnamelabel.setBounds(x,y,300,25);y+=60; p72.add(lnamelabel); JLabel genderlabel=new JLabel("Gender"); genderlabel.setForeground(Color.WHITE); genderlabel.setFont(f3); genderlabel.setBounds(x,y,300,25);y+=60; p72.add(genderlabel); JLabel addrlabel=new JLabel("Address"); addrlabel.setFont(f3); addrlabel.setForeground(Color.WHITE); addrlabel.setBounds(x,y,300,25);y+=60; p72.add(addrlabel); JLabel countrylabel=new JLabel("Travelled Countries"); countrylabel.setForeground(Color.WHITE); countrylabel.setFont(f3); countrylabel.setBounds(x,y,300,25);y+=60; p72.add(countrylabel); JLabel emaillabel1=new JLabel("EMail Id"); emaillabel1.setFont(f3); emaillabel1.setForeground(Color.WHITE); emaillabel1.setBounds(x,y,300,25);y+=60; p72.add(emaillabel1); JLabel phonelabel=new JLabel("Phone No"); phonelabel.setForeground(Color.WHITE); phonelabel.setFont(f3);
phonelabel.setBounds(x,y,300,25);y+=60; p72.add(phonelabel); x=400;y=30; passno2=new JLabel(""); passno2.setFont(f3); passno2.setForeground(Color.WHITE); passno2.setBounds(x,y,300,25);y+=60; p72.add(passno2); fname2=new JLabel(""); fname2.setForeground(Color.WHITE); fname2.setFont(f3); fname2.setBounds(x,y,300,25);y+=60; p72.add(fname2); lname2=new JLabel(""); lname2.setFont(f3); lname2.setForeground(Color.WHITE); lname2.setBounds(x,y,300,25);y+=60; p72.add(lname2); gender2=new JLabel(""); gender2.setFont(f3); gender2.setForeground(Color.WHITE); gender2.setBounds(x,y,300,25);y+=60; p72.add(gender2); addr2=new JLabel(""); addr2.setFont(f3); addr2.setForeground(Color.WHITE); addr2.setBounds(x,y,300,25);y+=60;
p72.add(addr2); country2=new JLabel(""); country2.setFont(f3); country2.setForeground(Color.WHITE); country2.setBounds(x,y,300,25);y+=60; p72.add(country2); email2=new JLabel(""); email2.setFont(f3); email2.setForeground(Color.WHITE); email2.setBounds(x,y,300,25);y+=60; p72.add(email2); phno2=new JLabel(""); phno2.setFont(f3); phno2.setForeground(Color.WHITE); phno2.setBounds(x,y,300,25);y+=60; p72.add(phno2); JPanel p73=new JPanel(); p7.add(p73,BorderLayout.SOUTH); p73.setBackground(Color.BLACK); ImageIcon w13=new ImageIcon("back1.png"); backview=new JButton("Back",w13); backview.setForeground(Color.WHITE); backview.setBackground(Color.BLACK); backview.setActionCommand("BACKVIEW"); backview.addActionListener(this); p73.add(backview);
p1.setVisible(true); } else if(e.getActionCommand()=="BACK") { p1.setVisible(false); p.setVisible(true); } else if(e.getActionCommand()=="APPLY") { p1.setVisible(false); form1.setText(""+i); add(p4); p4.setVisible(true); i=i+100; fnam.setText(""); lnam.setText(""); gen1.setText(""); age1.setText(""); addr1.setText(""); town1.setText(""); city1.setText("");
} else if(e.getActionCommand()=="RENEW") { p1.setVisible(false); i=i+200; formrenew.setText(""+i); add(renewpanel); renewpanel.setVisible(true); i=i+100; namerenew.setText(""); passportrenew.setText(""); emailrenew.setText(""); phrenew.setText("");
} else if(e.getActionCommand()=="BACKO") { p4.setVisible(false); p1.setVisible(true); } else if(e.getActionCommand()=="BACKVIEW") { p7.setVisible(false); p6.setVisible(true); } else if(e.getActionCommand()=="BACKRENEW") { renewpanel.setVisible(false); p1.setVisible(true); } else if(e.getActionCommand()=="CLEAR") { fnam.setText(""); lnam.setText(""); gen1.setText(""); age1.setText(""); addr1.setText(""); town1.setText(""); city1.setText(""); state1.setText(""); nation1.setText("");
email1.setText(""); ph1.setText("");
} else if(e.getActionCommand()=="CANCEL") { System.exit(0); } else if(e.getActionCommand()=="BACK2") { p6.setVisible(false); p1.setVisible(true); } else if(e.getActionCommand()=="BACKPAY") { pay.setVisible(false); p4.setVisible(true); } else if(e.getActionCommand()=="BACKRENEWPAY")
} catch(Exception e2){} }
else if(e.getActionCommand()=="SUBMITRENEW") { try { ps1=con.prepareStatement("INSERT INTO renew_passport VALUES(?,?,?,?,?)"); te=Integer.parseInt(formrenew.getText()); ps1.setInt(1,te); ps1.setString(2,namerenew.getText()); te=Integer.parseInt(passportrenew.getText()); ps1.setInt(3,te); ps1.setString(4,emailrenew.getText()); te=Integer.parseInt(phrenew.getText()); ps1.setInt(5,te); ps1.executeUpdate();
else if(e.getActionCommand()=="SUBMIT") { try { ps2=con.prepareStatement("INSERT INTO apply_passport VALUES(?,?,?,?,?,?,?,?,?,?,?,?)"); te=Integer.parseInt(form1.getText()); ps2.setInt(1,te); ps2.setString(2,fnam.getText()); ps2.setString(3,lnam.getText()); ps2.setString(4,gen1.getText()); te=Integer.parseInt(age1.getText()); ps2.setInt(5,te); ps2.setString(6,addr1.getText()); ps2.setString(7,town1.getText()); ps2.setString(8,city1.getText()); ps2.setString(9,state1.getText()); ps2.setString(10,nation1.getText()); ps2.setString(11,email1.getText()); te=Integer.parseInt(ph1.getText()); ps2.setInt(12,te); ps2.executeUpdate(); p4.setVisible(false); formtext.setText(""+form1.getText()); add(pay); pay.setVisible(true); } catch(Exception e1){}
} else if(e.getActionCommand()=="PAY") { try { ps3=con.prepareStatement("INSERT INTO form_pay VALUES(?,?,?)"); te=Integer.parseInt(formtext.getText()); ps3.setInt(1,te); te=Integer.parseInt(accnotext.getText()); ps3.setInt(2,te); te=1000; ps3.setInt(3,te); ps3.executeUpdate(); JOptionPane.showMessageDialog(this,"Hi applicant,Your application has been submitted and the transaction was succesfull","PASSPORT APPLICATION",JOptionPane.INFORMATION_MESSAGE,new ImageIcon("tick1.png")); formtext.setText(""); accnotext.setText(""); pay.setVisible(false); p1.setVisible(true);
} catch(Exception e1){}
{ ps4=con.prepareStatement("INSERT INTO renew_pay VALUES(?,?,?)"); te=Integer.parseInt(renewformtext.getText()); ps4.setInt(1,te); te=Integer.parseInt(renewaccnotext.getText()); ps4.setInt(2,te); te=500; ps4.setInt(3,te); ps4.executeUpdate(); JOptionPane.showMessageDialog(this,"Hi applicant,Your Passport Renewal Application has been submitted and the transaction was succesfull","PASSPORT APPLICATION",JOptionPane.INFORMATION_MESSAGE,new ImageIcon("tick1.png")); renewformtext.setText(""); renewaccnotext.setText(""); payrenew.setVisible(false); p1.setVisible(true); } catch(Exception e1){}
} } }
PANEL LAYOUT:
WELCOME PANEL:
APPLICATION PANEL:
RENEWAL PANEL:
VIEW PANEL:
PAYMENT PANEL:
Conclusion:
Thus to create the Passport Immigration Management has been successfully implemented using UML concept and the application has been developed
Referece:
1.Craig Larman ,Applying UML and Patterns,Pearson Education,Third edition . 2.Mike ODocherty,Object-Oriented Analysis and Design,John Wiley & Sons,2005.