1. 1 | P a g e
VELS VIDHYASHRAM
SENIOR SECONDARY
SCHOOL
E - GOVERNMENT HELPLINE
BY:-
NAME :- MATHESH . T
STD:- XII SEC :- B
ROLL NO :- 12225
2. 2 | P a g e
Acknowledgement
I would like to thank our IP Teacher Mrs.vasupriya
for her extended support and care in helpingme
finish this project.This project is a result of help of
many other people who gave me tips and guidelines
every time.
Our thanks should not stop alone with teachers.Our
friends and parents even played a big part in it.I see
this project as a result of hardwork from us and
innovation from our teacher.So, we once again
thanks all of them who put their hands in it and
made successful
3. 3 | P a g e
Index
Sl.No Content Page No
1 INTRODUCTION 4
2 ABOUT PROJECT 6
3 ABOUT JAVA 7
4 ABOUT NETBEANS 9
5 ABOUT MYSQL 11
6 SCREEN LAYOUT 13
7 IMPORTS 21
8 DATA VALIDATION 22
9 SOURCE CODE 26
10 BACKEND DATABASE 54
11 CONCLUSION 57
12 BIBILOGRAPHY 58
4. 4 | P a g e
INTRODUCTION:-
Electronic governance or e-governance is the application of
information and communication technology (ICT) for delivering
government services, exchange of information, communication
transactions, integration of various stand-alone systems and
services between government-to-citizen (G2C), government-to-
business (G2B), government-to-government (G2G) ,
government-to-employees (G2E) as well as back office
processes and interactions within the entire government
framework. Through e-governance, government services will be
made available to citizens in a convenient, efficient and
transparent manner. The three main target groups that can be
distinguished in governance concepts are government, citizens
and businesses/interest groups. In e-governance there are no
distinct boundaries.
Generally four basic models are available – government-to-
citizen (customer), government-to-employees, government-to-
government and government-to-business.
The goal of government-to-citizen (G2C) e-governance is to
offer a variety of ICT services to citizens in an efficient and
economical manner, and to strengthen the relationship between
government and citizens using technology.
5. 5 | P a g e
There are several methods of government-to-customer e-
governance. Two-way communication allows citizens to instant
message directly with public administrators, and cast remote
electronic votes (electronic voting) and instant opinion voting.
Transactions such as payment of services, such as city utilities,
can be completed online or over the phone. Mundane services
such as name or address changes, applying for services or
grants, or transferring existing services are more convenient and
no longer have to be completed face to face.
The strategic objective of e-governance, or in this case G2G is to
support and simplify governance for government, citizens and
businesses. The use of ICT can connect all parties and support
processes and activities. Other objectives are to make
government administration more transparent, speedy and
accountable, while addressing the society's needs and
expectations through efficient public services and effective
interaction between the people, businesses and government.
6. 6 | P a g e
ABOUT PROJECT:-
Public Sector service helpline through electronic devices helps
saving people valuable time.It also shows transperancy in the
service provided. The details are delivered quickly and
precisely.People who are not within the reach of Government
Offices can use this e-technology.
As our generation is etching towards a complete e-World ,
I hope that in future there will be a wide usage of e-government
helpline.
Advantages of e-Government Helpline:-
Fast and free services
Increases trust towards government
Saves time
Free of corruption
Immediate service when needed
Easy and within reach
Develops Transperancy in services.
Can pay Electricity bill
Can check your net Income
Can view helpline numbers in case of emergency
7. 7 | P a g e
ABOUT JAVA
Java is a general-purpose computer programming language that
is concurrent, class-based, object-oriented, and specifically
designed to have as few implementation dependencies as
possible. It is intended to let application developers "write once,
run anywhere" (WORA),meaning that compiled Java code can
run on all platforms that support Java without the need for
recompilation.[17]
Java applications are typically compiled to
bytecode that can run on any Java virtual machine (JVM)
regardless of computer architecture. As of 2016, Java is one of
the most popular programming languages in use, particularly for
client-server web applications, with a reported 9 million
developers. Java was originally developed by James Gosling at
Sun Microsystems (which has since been acquired by Oracle
Corporation) and released in 1995 as a core component of Sun
Microsystems' Java platform. The language derives much of its
syntax from C and C++, but it has fewer low-level facilities than
either of them.
The original and reference implementation Java compilers,
virtual machines, and class libraries were originally released by
Sun under proprietary licenses. As of May 2007, in compliance
with the specifications of the Java Community Process, Sun
relicensed most of its Java technologies under the GNU General
Public License. Others have also developed alternative
implementations of these Sun technologies, such as the GNU
Compiler for Java (bytecode compiler), GNU Classpath
8. 8 | P a g e
(standard libraries), and IcedTea-Web (browser plugin for
applets).
Principles
There were five primary goals in the creation of the Java
language:
1. It must be "simple, object-oriented, and familiar".
2. It must be "robust and secure".
3. It must be "architecture-neutraland portable".
4. It must execute with "high performance".
5. It must be "interpreted, threaded, and dynamic".
9. 9 | P a g e
ABOUT NETBEANS
NetBeans is a software development platform written in Java.
The NetBeans Platform allows applications to be developed
from a set of modular software components called modules.
Applications based on the NetBeans Platform, including the
NetBeans integrated development environment (IDE), can be
extended by third party developers.
The NetBeans IDE is primarily intended for development in
Java, but also supports other languages, in particular PHP,
C/C++ and HTML5.
NetBeans is cross-platform and runs on Microsoft Windows,
macOS, Linux, Solaris and other platforms supporting a
compatible JVM.
The editor supports many languages from Java, C/C++, XML
and HTML, to PHP, Groovy, Javadoc, JavaScript and JSP.
Because the editor is extensible, you can plug in support for
many other languages.
FEATURES:-
User interface management (e.g. menus and toolbars)
User settings management
Storage management (saving and loading any kind of data)
Window management
Wizard framework (supports step-by-step dialogs)
NetBeans Visual Library
Integrated development tools
10. 10 | P a g e
NetBeans IDE is an open-source integrated development
environment. NetBeans IDE supports development of all Java
application types (Java SE (including JavaFX), Java ME, web,
EJB and mobile applications) out of the box. Among other
features are an Ant-based project system, Maven support,
refactorings, version control (supporting CVS, Subversion, Git,
Mercurial and Clearcase).
11. 11 | P a g e
ABOUT MYSQL
MySQL is an open-source relational database management
system (RDBMS).Its name is a combination of "My", the name
of co-founder Michael Widenius's daughter,and "SQL", the
abbreviation for Structured Query Language. The MySQL
development project has made its source code available under
the terms of the GNU General Public License, as well as under a
variety of proprietary agreements. MySQL was owned and
sponsored by a single for-profit firm, the Swedish company
MySQL AB, now owned by Oracle Corporation.For proprietary
use, several paid editions are available, and offer additional
functionality.
MySQL is a central component of the LAMP open-source web
application software stack (and other "AMP" stacks). LAMP is
an acronym for "Linux, Apache, MySQL, Perl/PHP/Python".
Applications that use the MySQL database include: TYPO3,
MODx, Joomla, WordPress, Simple Machines Forum, phpBB,
MyBB, and Drupal. MySQL is also used in many high-profile,
large-scale websites, including Google (though not for
searches), Facebook, Twitter, Flickr, and YouTube.
MySQL is written in C and C++. Its SQL parser is written in
yacc, but it uses a home-brewed lexical analyzer. MySQL works
on many system platforms, including AIX, BSDi, FreeBSD, HP-
UX, eComStation, i5/OS, IRIX, Linux, macOS, Microsoft
Windows, NetBSD, Novell NetWare, OpenBSD, OpenSolaris,
OS/2 Warp, QNX, Oracle Solaris, Symbian, SunOS, SCO
12. 12 | P a g e
OpenServer, SCO UnixWare, Sanos and Tru64. A port of
MySQL to OpenVMS also exists.
The MySQL server software itself and the client libraries use
dual-licensing distribution. They are offered under GPL version
2,beginning from 28 June 2000(which in 2009 has been
extended with a FLOSS License Exception)or to use a
proprietary license.
Support can be obtained from the official manual.Free support
additionally is available in different IRC channels and forums.
Oracle offers paid support via its MySQL Enterprise products.
They differ in the scope of services and in price. Additionally, a
number of third party organisations exist to provide support and
services, including MariaDB and Percona.
13. 13 | P a g e
LAYOUT:-
WELCOME PAGE
CONTENTS PAGE:-
14. 14 | P a g e
EB ENTRY PAGE:-
NEW ACCOUNT PAGE:-
15. 15 | P a g e
OLD ACCOUNT PAGE:-
PAYMENT PAGE:-
16. 16 | P a g e
CREDIT CARD PAGE:-
DEBIT CARD PAGE:-
17. 17 | P a g e
NET BANKING PAGE:-
PAYMENT CONFIRMATION PAGE
PAGE:-
19. 19 | P a g e
TAX CALCULATION PAGE:-
OLD ACCOUNT PAGE:-
20. 20 | P a g e
DOWNLOADING FORMS PAGE:-
HELPLINE NUMBERS PAGE:-
21. 21 | P a g e
IMPORTS
importjavax.swing.JOptionPane
importjava.sql.DriverManager
importcom.mysql.jdbc.Statement
importcom.mysql.jdbc.Connection
importjava.util.regex.Pattern
importjava.sql.ResultSet
importjava.util.Calendar
importjavax.swing.table.DefaultTableModel
22. 22 | P a g e
DATA VALIDATION
PASSWORD TEST:-
public boolean passwordtest (String k)
{
Pattern spcchar=Pattern.compile("[@!&%$#_*]");
Pattern ucase=Pattern.compile("[A-Z]");
Pattern lcase=Pattern.compile("[a-z]");
Pattern num=Pattern.compile("[0-9]");
boolean x=false;
if(k.length()<=8)
{
JOptionPane.showMessageDialog(null,"Your password must have atleast 8 characters!!!");
x=true;
}
if(!spcchar.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one special
character!!!");
x=true;
}
if(!ucase.matcher(k).find())
{
23. 23 | P a g e
JOptionPane.showMessageDialog(null,"Your password must have atleast one Uppercase
character!!!");
x=true;
}
if(!lcase.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one lowercase
character!!!");
x=true;
}
if(!num.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one digit
character!!!");
x=true;
}
boolean op=x;
return op;
}
VALIDATING PASSWORD:-
if(p.equals(p1))
{
JOptionPane.showMessageDialog(null,"Password is matching");
}
24. 24 | P a g e
VALIDATING DATE:-
int month=Integer.parseInt(jTextField5.getText());
int year=Integer.parseInt(jTextField6.getText());
int CY=Calendar.getInstance().get(Calendar.YEAR);
int CM=Calendar.getInstance().get(Calendar.MONTH);
if(year==CY&&month>=CM&& month<=12)
{
check=1;
}
else if(year>CY&&month<=12)
{
check=2;
}
CHECKING ACCOUNT:-
int a=Integer.parseInt(jTextField1.getText());
int b=Integer.parseInt(jTextField2.getText());
int c=Integer.parseInt(jTextField3.getText());
String eb1=String.valueOf(a);
String eb2=String.valueOf(b);
String eb3=String.valueOf(c);
String eb= eb1+"/"+eb2+"/"+eb3;
25. 25 | P a g e
String p=jPasswordField1.getText();
try{
Class.forName("java.sql.DriverManager");
Connection Con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/pss","root","1234");
Statement st=(Statement)Con.createStatement();
String q="Select * from eb where password='"+p+"';";
ResultSet rs=st.executeQuery(q);
int f=0;
while(rs.next())
{
String o=rs.getString("eb_no");
String v=rs.getString("password");
if( eb.equals(o))
{
JOptionPane.showMessageDialog(null,"You are being redirected to Payment page");
this.dispose();
new PAYMENT().setVisible(true);
f++;
}}
if(f==0)
{ JOptionPane.showMessageDialog(null,"Account doesn't exist. Create new one");
}}
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
}}
26. 26 | P a g e
SOURCE CODE
JFrame:- Welcome
jButton1:-
{
this.dispose();
new contents().setVisible(true);
}
jButton2:-
{
System.exit(0);
}
JFrame:- Contents
jButton1:-
{
this.dispose();
new EB1().setVisible(true);
}
jButton2:-
{
this.dispose();
new DOWNLOADFORMS().setVisible(true);
}
27. 27 | P a g e
jButton3:-
{
this.dispose();
new SMARTCARD().setVisible(true);
}
jButton4:-
{
this.dispose();
new INCOMETAX().setVisible(true);
}
jButton5:-
{
this.dispose();
new helpline().setVisible(true);
}
jButton6:-
{
System.exit(0);
}
JFrame:- EB1 ( Eb payment enter page)
jButton1:-
{
this.dispose();
new NEWACC().setVisible(true); }
28. 28 | P a g e
jButton2:-
{
this.dispose();
new OLDACC().setVisible(true);
}
JFrame:- NEWACC ( New account)
public boolean passwordtest (String k)
{
Pattern spcchar=Pattern.compile("[@!&%$#_*]");
Pattern ucase=Pattern.compile("[A-Z]");
Pattern lcase=Pattern.compile("[a-z]");
Pattern num=Pattern.compile("[0-9]");
boolean x=false;
if(k.length()<=8)
{
JOptionPane.showMessageDialog(null,"Your password must have atleast 8 characters!!!");
x=true;
}
if(!spcchar.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one special
character!!!");
x=true;
}
29. 29 | P a g e
if(!ucase.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one Uppercase
character!!!");
x=true;
}
if(!lcase.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one lowercase
character!!!");
x=true;
}
if(!num.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one digit
character!!!");
x=true;
}
boolean op=x;
return op;
}
jButton1:-
{
String name = jTextField1.getText();
String gender=null;
30. 30 | P a g e
if(jRadioButton1.isSelected())
{
gender="male";
}
else if(jRadioButton2.isSelected())
{
gender="female";
}
int a=Integer.parseInt(jTextField2.getText());
int b=Integer.parseInt(jTextField3.getText());
int c=Integer.parseInt(jTextField4.getText());
String eb1=String.valueOf(a);
String eb2=String.valueOf(b);
String eb3=String.valueOf(c);
String eb= eb1+"/"+eb2+"/"+eb3;
String d=jTextField5.getText();
String p1=jPasswordField1.getText();
String p=jPasswordField2.getText();
if(p.equals(p1))
{
JOptionPane.showMessageDialog(null,"Password is matching");
boolean check = passwordtest(p);
31. 31 | P a g e
if (check==false)
{
try{
Class.forName("java.sql.DriverManager");
Connection Con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/pss","root","1234");
Statement st=(Statement)Con.createStatement();
String q="Insert into eb values('"+name+"','"+gender+"','"+eb+"','"+d+"','"+p+"');";
st.executeUpdate(q);
JOptionPane.showMessageDialog(null,"Account created");
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,e.getMessage());
}
JOptionPane.showMessageDialog(null,"You are being redirected to payment page");
this.dispose();
new PAYMENT().setVisible(true);
}
else
{
JOptionPane.showMessageDialog(null,"Pls Validate password properly ");
} }}
32. 32 | P a g e
JFrame:-OLDACC (Oldaccount)
public boolean passwordtest (String k)
{
Pattern spcchar=Pattern.compile("[@!&%$#_*]");
Pattern ucase=Pattern.compile("[A-Z]");
Pattern lcase=Pattern.compile("[a-z]");
Pattern num=Pattern.compile("[0-9]");
boolean x=false;
if(k.length()<=8)
{
JOptionPane.showMessageDialog(null,"Your password must have atleast 8 characters!!!");
x=true;
}
if(!spcchar.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one special
character!!!");
x=true;
}
if(!ucase.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one Uppercase
character!!!");
x=true;
}
33. 33 | P a g e
if(!lcase.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one lowercase
character!!!");
x=true;
}
if(!num.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one digit
character!!!");
x=true;
}
boolean op=x;
return op;
}
jButton1:-
{
int a=Integer.parseInt(jTextField1.getText());
int b=Integer.parseInt(jTextField2.getText());
int c=Integer.parseInt(jTextField3.getText());
String eb1=String.valueOf(a);
String eb2=String.valueOf(b);
String eb3=String.valueOf(c);
String eb= eb1+"/"+eb2+"/"+eb3;
34. 34 | P a g e
String p=jPasswordField1.getText();
boolean check=passwordtest(p);
if(check=true)
{
try{
Class.forName("java.sql.DriverManager");
Connection Con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/pss","root","1234");
Statement st=(Statement)Con.createStatement();
String q="Select * from eb where password='"+p+"';";
ResultSet rs=st.executeQuery(q);
int f=0;
while(rs.next())
{
String o=rs.getString("eb_no");
String v=rs.getString("password");
if( eb.equals(o))
{
JOptionPane.showMessageDialog(null,"You are being redirected to Payment page");
this.dispose();
new PAYMENT().setVisible(true);
f++;
}}
35. 35 | P a g e
if(f==0)
{
JOptionPane.showMessageDialog(null,"Account doesn't exist. Create new one");
} }
catch (Exception e)
{
JOptionPane.showMessageDialog(null,e.getMessage());
}
}
else
{
JOptionPane.showMessageDialog(null,"Pls check your password");
} }
jButton2:-
{
this.dispose();
new NEWACC().setVisible(true);
}
JFrame:- PAYMENT (EB Bill payment)
jButton1:-
{
double u=Double.parseDouble(jTextField1.getText());
double p=0;
36. 36 | P a g e
if(u<100)
{
p=u*1;
jTextField2.setText(""+p);
}
else if(u>100&&u<201)
{
p=u*150/100;
jTextField2.setText(""+p);
}
else if(u>201&&u<501)
{
p=u*3;
jTextField2.setText(""+p);
}
else if(u>500)
{
p=u*575/100;
jTextField2.setText(""+p);
}
else{
JOptionPane.showMessageDialog(null,"Pls enter appropriate units");
}
37. 37 | P a g e
jTextField2.setEditable(false);
}
jButton2:-
double o= Double.parseDouble(jTextField2.getText());
switch(jComboBox1.getSelectedIndex())
{
case 0:JOptionPane.showMessageDialog(null,"Your payment is"+o+". You are being
redirected to Payment Gateway");
this.dispose();
new creditcard().setVisible(true);
break;
case 1:JOptionPane.showMessageDialog(null,"Your payment is"+o+". You are being
redirected to Payment Gateway");
this.dispose();
new debitcard().setVisible(true);
break;
case 2:JOptionPane.showMessageDialog(null,"Your payment is "+o+". You are being
redirected to Payment Gateway");
this.dispose();
new NETBANKING().setVisible(true);
break;
} }
JFrame- creditcard
jButton1:-
int a=Integer.parseInt(jTextField1.getText());
int b=Integer.parseInt(jTextField2.getText());
38. 38 | P a g e
int c=Integer.parseInt(jTextField3.getText());
int d=Integer.parseInt(jTextField4.getText());
int month=Integer.parseInt(jTextField5.getText());
int year=Integer.parseInt(jTextField6.getText());
int CY=Calendar.getInstance().get(Calendar.YEAR);
int CM=Calendar.getInstance().get(Calendar.MONTH);
String name=jTextField7.getText();
String ccv=jPasswordField1.getText();
int check=0;
if(ccv.length()==3){
if(year==CY&&month>=CM&&month<=12)
{
check=1;
}
else if(year>CY&&month<=12)
{
check=2;
}
if(check>0)
{
JOptionPane.showMessageDialog(null,"You payment is being processed.Don't click exit
buttton");
this.dispose();
new success().setVisible(true);
}
39. 39 | P a g e
else{
JOptionPane.showMessageDialog(null,"Pls enter correct details");
}}
JFrame- debitcard
jButton1:-
{
int a=Integer.parseInt(jTextField1.getText());
int b=Integer.parseInt(jTextField2.getText());
int c=Integer.parseInt(jTextField3.getText());
int d=Integer.parseInt(jTextField4.getText());
int month=Integer.parseInt(jTextField5.getText());
int year=Integer.parseInt(jTextField6.getText());
int CY=Calendar.getInstance().get(Calendar.YEAR);
int CM=Calendar.getInstance().get(Calendar.MONTH);
String name=jTextField7.getText();
String ccv=jPasswordField1.getText();
int check=0;
if(ccv.length()==3){
if(year==CY&&month>=CM)
{
check=1;
}
else if(year>CY&&month<=12)
{
check=2; }
40. 40 | P a g e
if(check>0)
{
JOptionPane.showMessageDialog(null,"You payment is being processed.Don't click exit
buttton");
this.dispose();
new success().setVisible(true);
}
else{
JOptionPane.showMessageDialog(null,"Pls enter correct details");
} } }
JFrame – NETBANKING
public boolean passwordtest (String k)
{
Pattern spcchar=Pattern.compile("[@!&%$#_*]");
Pattern ucase=Pattern.compile("[A-Z]");
Pattern lcase=Pattern.compile("[a-z]");
Pattern num=Pattern.compile("[0-9]");
boolean x=false;
if(k.length()<=8)
{
JOptionPane.showMessageDialog(null,"Your password must have atleast 8 characters!!!");
x=true;
}
if(!spcchar.matcher(k).find())
41. 41 | P a g e
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one special
character!!!");
x=true;
}
if(!ucase.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one Uppercase
character!!!");
x=true;
}
if(!lcase.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one lowercase
character!!!");
x=true;
}
if(!num.matcher(k).find())
{
JOptionPane.showMessageDialog(null,"Your password must have atleast one digit
character!!!");
x=true;
}
boolean op=x;
return op;
}
42. 42 | P a g e
jButton1:-
{
String uname=jTextField1.getText();
String pass=jPasswordField1.getText();
boolean xy=passwordtest(pass);
if(xy==false)
{
JOptionPane.showMessageDialog(null,"You payment is being processed.Don't click exit
buttton");
this.dispose();
new success().setVisible(true);
}
else
{
JOptionPane.showMessageDialog(null,"pls check your details");
}
}
JFrame- success (Payment Confirmation Page)
jButton1:-
{
this.dispose();
new contents().setVisible(true);
}
43. 43 | P a g e
jButton2:-
{
System.exit(0);
}
JFrame- INCOME TAX
jButton1:-
{
this.dispose();
new CALCULATION().setVisible(true);
}
jButton2:-
{
this.dispose();
new contents().setVisible(true); }
JFrame- CALCULATION
public double tax(double a)
{
a=Double.parseDouble(jTextField2.getText());
double it=0;
if(a<300000)
{
jTextField3.setText("Nil");
}
44. 44 | P a g e
else if(a>300000&&a<500001)
{
it=a*5/100;
jTextField3.setText(""+it);
}
else if(a>500000&&a<1000001)
{
it=a*10/100;
jTextField3.setText(""+it);
}
else if(a>1000000)
{
it=a*20/100;
jTextField3.setText(""+it);
}
else
{
JOptionPane.showMessageDialog(null,"Pls enter appropriate values");
}
double np=a-it;
return np;
}
45. 45 | P a g e
jButton1:-
{
String name=jTextField1.getText();
double s=Double.parseDouble(jTextField2.getText());
double net=tax(s);
jTextField4.setText(""+net);
jTextField3.setEditable(false);
jTextField4.setEditable(false);
}
jButton2:-
{
System.exit(0);
}
JFrame – SMARTCARD
jButton1:-
{
String sid=String.valueOf(jTextField1.getText());
if(sid.length()==8)
{
String name=jTextField2.getText();
String g=null;
if(jRadioButton1.isSelected())
{
g="Male";
46. 46 | P a g e
}
else if(jRadioButton2.isSelected())
{
g="Female";
}
String dob=String.valueOf(jTextField3.getText());
int pin=Integer.parseInt(jTextField4.getText());
String add=String.valueOf(jTextArea1.getText());
try{
Class.forName("java.sql.DriverManager");
Connection Con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/pss","root","1234");
Statement st=(Statement)Con.createStatement();
String q="Insert into smart
values('"+sid+"','"+name+"','"+g+"','"+dob+"','"+pin+"','"+add+"');";
st.executeUpdate(q);
JOptionPane.showMessageDialog(null,"Your details have been uploaded . Details
uploaded will be in your SmartCard soon");
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,e.getMessage());
} }
else{
JOptionPane.showMessageDialog(null,"Pls enter appropriate code");
} }
47. 47 | P a g e
jButton2:-
{
JOptionPane.showMessageDialog(null,"Info:-Details will be deleted only based on SmartID");
String s=JOptionPane.showInputDialog("Enter your Unique 8 digit Smartcard id");
int sid=Integer.parseInt(s);
try{
Class.forName("java.sql.DriverManager");
Connection Con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/pss","root","1234");
Statement st=(Statement)Con.createStatement();
String q="Delete from smart where sid='"+sid+"';";
st.executeUpdate(q);
JOptionPane.showMessageDialog(null,"Your details have been deleted");
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,e.getMessage());
} }
jButton3:-
JOptionPane.showMessageDialog(null,"Info:-Details will be Updated only based on SmartID
and name only will be updated.");
String s=JOptionPane.showInputDialog("Enter your Unique 8 digit Smartcard id");
int sid=Integer.parseInt(s);
String name=JOptionPane.showInputDialog(null,"Enter Your Name");
try{
48. 48 | P a g e
Class.forName("java.sql.DriverManager");
Connection Con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/pss","root","1234");
Statement st=(Statement)Con.createStatement();
String q="Update smart set name='"+name+"' where sid='"+sid+"';";
st.executeUpdate(q);
JOptionPane.showMessageDialog(null,"Your details have been deleted");
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,e.getMessage());
} }
jButton4:-
DefaultTableModel tm=(DefaultTableModel)jTable1.getModel();
String s=JOptionPane.showInputDialog("Enter your Unique 8 digit Smartcard id");
int sid=Integer.parseInt(s);
try{
Class.forName("java.sql.DriverManager");
Connection
Con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost:3306/pss","root","1234
");
Statement st=(Statement)Con.createStatement();
String q="Select * from smart where sid='"+sid+"';";
ResultSet rs= st.executeQuery(q);
while (rs.next())
{
int a=rs.getInt("sid");
49. 49 | P a g e
String b=rs.getString("name");
String c=rs.getString("gender");
String d=rs.getString("dateofbirth");
int e=rs.getInt("pincode");
String f=rs.getString("address");
tm.addRow(new Object[]{a,b,c,d,e,f});
JOptionPane.showMessageDialog(null,"Retrieved");
}
rs.close();
st.close();
Con.close();
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null,e.getMessage());
} }
jButton5:-
System.exit(0);
JFrame – DOWNLOAD FORMS
jButton1:-
{
switch(jComboBox1.getSelectedIndex())
{
50. 50 | P a g e
case 0: try{
Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler
"+"C:UsersAdminDesktopNETBEANS PROJECTpublicsectorserviceaadhar new and
correction form.pdf");
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
break;
case 1: try{
Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler
"+"C:UsersAdminDesktopNETBEANS PROJECTpublicsectorserviceDRIVING
LICENCE FORM.pdf");
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
break;
case 2: try{
Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler
"+"C:UsersAdminDesktopNETBEANS PROJECTpublicsectorserviceMEDICAL
CERTFICATE.pdf");
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
51. 51 | P a g e
}
break;
case 3: try{
Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler
"+"C:UsersAdminDesktopNETBEANS PROJECTpublicsectorservicePAN
FORM.pdf");
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
break;
case 4: try{
Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler
"+"C:UsersAdminDesktopNETBEANS PROJECTpublicsectorserviceMarriage
registration.pdf");
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
break;
case 5: try{
Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler
"+"C:UsersAdminDesktopNETBEANS PROJECTpublicsectorserviceSurrender of
permit and clearance.pdf");
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
52. 52 | P a g e
}
break;
case 6: try{
Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler
"+"C:UsersAdminDesktopNETBEANS PROJECTpublicsectorserviceEncumbrance
certificate.pdf");
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
break;
case 7: try{
Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler
"+"C:UsersAdminDesktopNETBEANS PROJECTpublicsectorserviceAuthorization for
tourist permit.pdf");
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
break;
case 8: try{
Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler
"+"C:UsersAdminDesktopNETBEANS PROJECTpublicsectorservicePASSPORT
APPLICATION FORM.pdf");
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
53. 53 | P a g e
}
break;
case 9: try{
Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler
"+"C:UsersAdminDesktopNETBEANS PROJECTpublicsectorserviceTrade
certificate.pdf");
}
catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
break;
} }
JFrame – helpline (Helpline Numbers)
jButton 1:-
{
System.exit(0);
}
jButton2:-
{
this.dispose();
new contents().setVisible(true);
}
54. 54 | P a g e
BACK – END DATABASE
DATABASE CREATION
TABLE (eb) AND STRUCTURE
55. 55 | P a g e
EB TABLE :-
TABLE(smart) AND ITS STRUCTURE
57. 57 | P a g e
CONCLUSION
As we are edging towards a completely technical world , we are
need of advanced technologies for every thing . Day to day to life
seems to impossible without electronic appliances. So to save our
precious time and energy we require Public sector services to be
technically available. This also ensures more trusts towards
Government.
Following are the advantages of E- Governmental helpline:-
Can pay Eb bill easily within a matter of time.
Apply for smart card or other cards easily rather standing in a
long queue
Accessible in any mobile or computer.
Easiliy Download forms whenever needed
Can view all helpline numbers when there is a emergency
situation.
Calculate your Income tax and record your net income.
58. 58 | P a g e
BIBILOGRAPHY
CLASS 12 NCERT BOOK
CLASS 11 AND 12 RECORD NOTEBOOKS
https://www.tin-nsdl.com/downloads/pan/download/Form49A-
%20July%201,%202017.pdf
https://uidai.gov.in/images/aadhaar_enrolment_correction_form_version_
2.1.pdf
http://www.tn.gov.in/sta/app1.html
www.downloadformsindia.com
http://passportindia.gov.in/AppOnlineProject/online/printForm
YOUTUBE
www.stackoverflow.com