You are on page 1of 65

PROJECT REPORT

On

CRIME MANAGEMENT SYSTEM


To
DIT UNIVERSITY, DEHRADUN

Under the Supervision of: SubmittedBy:-


Mr. Ashish Saxena Prarthna Bahuguna

Department of Computer Applications MCA

165339910

[I]
ACKNOWLEDGEMENT

At the outset, I thank God almighty for making my endeavor a success. I express my sincere
gratitude to Mr. Ashish Saxena for his constant support and valuable suggestions without which
the successful completion of this Dissertation would not have been possible. I express my
immense pleasure and thankfulness to Mr. Ashish Saxena and all the teachers and staff of the
Department of Computer Science and Engineering for their cooperation and support.

Finally, I am thankful to my classmates for their cooperation and support that helped me in the
successful completion of this work.

Prarthna Bahuguna
MCA 5th Sem

[II]
DECLARATION

I, Prarthna Bahuguna, student of M.C.A hereby declare that the project titled “CRIME
MANAGEMENT SYSTEM”, which is submitted by me to Dehradun Institute of Technology,
Dehradun, Uttarakhand, in partial fulfilment of requirement for the award of the degree of M.C.A, has not
been previously formed the basis for the award of any degree, diploma or other similar title or
recognition.

The author attests that permission has been obtained for the use of any copy righted material
appearing in the Dissertation / Project Report other than brief excerpts required only proper
acknowledgement in scholarly writing and all such use is acknowledged.

Prarthna Bahuguna

MCA -V

165339910

[III]
CERTIFICATE OF ORIGINALITY

This is to certify that this project entitled “CRIME MANAGEMENT SYSTEM ” submitted in partial
fulfillment of the degree of Master Of Computer Application to the DIT UNIVERSITY , Dehradun done
by project members is an authentic work carried out by him under my guidance. The matter embodied in
this project work has not been submitted earlier for award of any degree or diploma to the best of my
knowledge and belief.

[IV]
TABLE OF CONTENT

1. Introduction 1

2. Objectives 2

3. System Analysis
3.1 Identification of Need 3

3.2 Preliminary Investigation 4

3.3 Feasibility Study 5-6

3.4 Software requirement specifications 7-8

3.5 Software Engineering Paradigm applied 8-9

3.6 Data models 9-11

4. System Design
4.1 File System design 12-13

4.2 User Interface Design 13-19

5. Testing
5.1 Unit Testing 20

5.2 System Testing 20

5.3 Black box Testing 21

5.4 White box Testing 21


6. System Security measures 22

7. Reports 23

8. Future scope and further enhancement of the Project 24

9. Appendices
9.1 Coding 25-58

9.2 Bibliography 59
1. INTRODUCTION OF THE PROJECT

The Crime Management System is a software application solution which is useful for the police
stations for handling information like add, view and update of a CRIMINAL and FIR.

The police station employee can add records in the database and can also view when needed.
When employee needs any record according to some specifications, the employee can view the
records.

The software not only saves the user’s time but it also reduces the paperwork. The records are
divided into three categories. The first one is crime record, change password and fir record.

Earlier, it was very difficult to maintain the records on pages manually, but with help of this

program we can solve the problem. Previously, if the user wants to search for any information

he/she has to go through number of pages, but he/she would not be able to find the records.

Many times they find that many pages of records get damaged or misplaced but with the

help of this project the user can keep the records safely and correctly. With the help of

this system user will be able to get the information as early as possible.

-1-
2. OBJECTIVE OF THE PROJECT

 It is the user-friendly project. It can be run by the user very easily.

 It consumes less time of the user.

 It provides right information to the user.

 It is economical beneficial, as its maintenance cost is less and no special


training is needed to run it.

 It is environment friendly, as it works without pages.

 We can easily access the pre-defined record.

 We can easily modify the present data as well as the previous data.

-2-
3. SYSTEM ANALYSIS

3.1 Identification of Need


In existing system manual methods are used where large number of human resource is required.
For every single task there must be one employee which increases maintenance cost for Police
Station. Paperwork which have been done manually can be very tiresome job and also prone to
errors. It takes a lot of efforts to manage them properly. In order to overcome all these problems
new system is developed.

The software is developed for police stations. This software makes the management of police
station easy and fast. It will also reduce cost, increase efficiency and provide security. It will use
database to store data of the criminals and fir’s.

The user can view and update the information directly into the application software which is
more fast, efficient and less prone to errors. It will also reduce the paperwork which saves the
money as well.

The software uses the database to store the information of the records. The Software also has
change password option so if the user wants to change the password so he/she can easily change
the password.

-3-
3.2 Preliminary Investigation
During analysis, we investigated the current working process of the Crime Management

System in which we found out that the detail of the crimes and FIR’s related to police

station are being maintained in papers. There were different register. If any of the detail of a

criminal is required to be updated, then the in-charge person needs to manually find the

criminal detail in a register, then search for the criminal name and then update the

corresponding detail and highlight it to show that the record has been updated. This process

is slow, error prone, and requires slots of effort. When any person visits the police station,

then the police station needs to manually write the FIR which was again a very difficult

task. So, we need to develop an application that can overcome all these problems.

The proposed system needs to provide a simple interface that should allow the police

station person in-charge to easily maintain the FIR records and criminal records, allow them

to quickly search for the criminal or FIR whose details needs to be updated, and allow to

update the record and mark it as updated.

-4-
3.3 Feasibility Study

User Need

Feasibility study tried to determine whether a given solution would work or not its main
objective is not to serve the problem, but to acquire its scope its focus on following:

 Meet user requirement


 best utilization of available resources
 develop a cost effective system
 develop a technically physical system

i) Technical feasibility

The system we intend to build require front end to interact with the user and a back end to

store the data like FIR record, criminal records, etc. The front-end will be designed in

Java Swing and Java Database (Apache-Derby Database) will be used in back-end. So the

proposed system is technically feasible.

ii) Economic feasibility

The proposed system is economically feasible as the tools and platform we require are

available on the internet free of cost, like JDK (Java Development Kit), Text pad, Net

Beans, etc. These are openly available for everyone on various platforms like MS

Windows, Linux, etc., to create any kind of application.

-5-
iii) Operational feasibility

The system is operationally feasible as the application is a simple GUI application with

all the instructions provided to the user and all operations separated in different menu and

submenu. So, the users will find the system easy to operate and thus, the system is

operationally feasible.

-6-
3.4 Software Requirement Specification(SRS)

Introduction

The following subsections of the SRS document provide an overview of the entire SRS.

A. Purpose

The purpose of the project is to provide facility to the person in charge of police station so

that he can perform his\her work in an application instead of working in papers. The user

can maintain and update the details like, fir details, name, date, criminal number, name, date

of crime, released date, address, etc.;

B. Scope

The application will be used by the person in charge for maintaining and updating the FIR’s

records and criminal records, generate the list of FIR and criminals and updating those

details.

C. Benefits

This application reduces the complexity, maintaining accuracy, increasing efficiency and

saving time.

-7-
SOFTWARE SPECIFICATION USED

 Operating System – Windows 7 Pro 32-bit


 Java Development Kit – 1.7.0_45
 Net beans IDE – 7.4

HARDWARE SPECIFICATION USED

 Processor – Intel Core 2 Duo 2.10 GHz

 RAM – 2 GB

 Hard Disk – 500 GB

3.5 Software Engineering Paradigm applied

The software engineering paradigm applied in the system is waterfall model. Firstly,

requirement of the system were analyzed. What was needed to build the proposed system,

what were the initial requirements of the system was determined. Like, this system is used

by police station in charge, so we need to provide the menu as the intent of using the

application.

Then the system was designed on the basis of the requirement determined in the analysis

phase. The design includes the different menus and options that will be displayed to the

user. Like, menu for the criminal and FIR records will have options to add a criminal and

fir, View criminal and FIR Records, and Edit criminal and fir records.

-8-
3.6 Data Models

0-Level DFD

-9-
1-Level

- 10 -
2-Level DFD

- 11 -
4. SYSTEM DESIGN

4.1 Database Design


There are four table in the Database of this application those are:

1) USERTABLE

Field Name Data Type Constraint


SNO INTEGER Primary key, Not Null, Auto
increment
USERID VARCHAR(50) Not Null
PASS VARCHAR(50) Not Null

2) STUTABLE

Field Name Data Type Constraint


CRIMINALNUMBER INTEGER Primary Key, Not Null, Auto
Increment
NAME VARCHAR(50) Not Null
GENDER VARCHAR(10) Not Null
DOB DATE Not Null
ADDRESS VARCHAR(100) Not Null
OCCUPATION VARCHAR(50) Not Null
TYPEOFCRIME VARCHAR(50) Not Null
ARRESTDATE DATE Not Null
ARRESTLOCATION VARCHAR(50) Not Null
PUNISH VARCHAR(50) Not Null
LOCKER VARCHAR(50) Not Null
RELEASE DATE Not Null
DETAILOFCRIM VARCHAR(50) Not Null

- 12 -
3) FIRTABLE

Field Name Data Type Constraint


FIRNUMBER INTEGER Primary Key, Not Null, Auto
Increment
NAME VARCHAR(50) Not Null
IDNUMBER VARCHAR(50) Not Null
DOB DATE Not Null
GENDER VARCHAR(10) Not Null
ADDRESS VARCHAR(100) Not Null
DETAILS VARCHAR(500) Not Null

4.2 User Interface Design


 Login Screen

- 13 -
 Main Screen

- 14 -
 Criminal Record

o New criminal Record

- 15 -
o View Criminal Records

- 16 -
o Update Criminal Records

- 17 -
 Change password

- 18 -
 FIR RECORDS

o Add FIR Record

o View FIR Records

- 19 -
o Update FIR Record

- 20 -
5. TESTING

5.1 Unit testing

Each module is tested separately simultaneously along with the coding of the module to

check if the module is performing its task correctly. We checked if the module is behaving

properly according to the input given. All the modules that need to write data to file are

checked by opening the file, that if the data is being written into the file properly. For

example after coding the Add Criminal Record module, we check whether the data is being

stored in the Database table manually by executing SQL command. Similarly testing was

done for all other modules.

All the modules are working correctly as far as my testing.

5.2 System Testing

When all the modules of the system are put together, the system is tested against the system

requirement to see if the entire requirements are met and if the system performs as specified

by the requirement. When all the modules were integrated in the main frame the application

was functioning correctly. All modules were functioning correctly and performing all the

operations.

I have put my efforts to remove the bugs, but nothing is perfect in the world, so is with this

application.

- 21 -
5.3 Black Box Testing

We put this application under black box testing and checked whether the system is producing

correct output or not for the given input. We found that the system is producing the expected

output so; the system has passed Black Box testing.

5.4 White Box Testing

We tested every module in detail, their output for different inputs and checked their behavior

when wrong inputs were given. For example if the user doesn’t filled all the information of

the Criminal then the message will appear that please enter all the details.

In case of the modules those store or retrieve data from the database, we checked that the

module behaved properly and data is being stored and retrieved in/from database correctly in

right format

- 22 -
6. SYSTEM SECURITY MEASURES

Implementation of security for the developed project.

 For security reasons the program is password protected.

 No one can access the program without correct password.

 If someone is try to open this program with wrong password and id then the program will

show the error message.

- 23 -
7. REPORTS

The main report generated from this application:

 Criminal Records

 FIR Records

- 24 -
8. Future Scope & Further Enhancement

This application software can be further updated with new features. Project is flexible i.e. any

change / modification can be performed easily. In this many other module can be added so to

automate the work of the police station.

 This application can be made web enabled so that anyone can report a FIR.

 This application provides managing various information about Criminals and FIR but we

can also add the feature to provide the current status about the police station.

 This application can also implement Thumb recognition or face detection technology for

identifying user, police person, criminals, etc.

- 25 -
9. APPENDICES

 Source Code
o Login form

import java.sql.*;

import javax.swing.ImageIcon;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

public class Login extends javax.swing.JFrame {

public Login() {

initComponents();

B();

setLocationRelativeTo(null);

public void B()

JLabel l = new JLabel(new ImageIcon(getClass().getClassLoader().getResource("images/LoginImage.jpg")));

l.setBounds(230, 50, 142, 144);

getContentPane().add(l);

JLabel b = new JLabel(new ImageIcon(getClass().getClassLoader().getResource("images/black.jpg")));

b.setBounds(0, 0, 450, 250);

getContentPane().add(b);

- 26 -
private void initComponents() {

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

LoginButton = new javax.swing.JButton();

ID = new javax.swing.JTextField();

exitButton = new javax.swing.JButton();

pass = new javax.swing.JPasswordField();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

setResizable(false);

jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

jLabel1.setForeground(new java.awt.Color(255, 255, 255));

jLabel1.setText("LOGIN");

jLabel2.setForeground(new java.awt.Color(255, 255, 255));

jLabel2.setText("User ID :");

jLabel3.setForeground(new java.awt.Color(255, 255, 255));

jLabel3.setText("Password :");

LoginButton.setText("Login");

LoginButton.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

LoginButtonActionPerformed(evt);

});

- 27 -
ID.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

IDActionPerformed(evt);

});

exitButton.setText("Exit");

exitButton.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

exitButtonActionPerformed(evt);

});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(37, 37, 37)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel2)

.addComponent(jLabel3))

.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(ID, javax.swing.GroupLayout.PREFERRED_SIZE, 100,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(pass, javax.swing.GroupLayout.PREFERRED_SIZE, 100,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel1))

- 28 -
.addGap(0, 182, Short.MAX_VALUE))

.addGroup(layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(LoginButton)

.addGap(18, 18, 18)

.addComponent(exitButton)))

.addContainerGap())

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(28, 28, 28)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 22,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(38, 38, 38)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel2)

.addComponent(ID, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(pass, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addGap(84, 84, 84))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(exitButton)

.addComponent(LoginButton))

.addContainerGap())

);

- 29 -
pack();

private void LoginButtonActionPerformed(java.awt.event.ActionEvent evt) {

String id =ID.getText();

String p = pass.getText();

try {

Class.forName("org.apache.derby.jdbc.EmbeddedDriver");

} catch (ClassNotFoundException ex) {

try {

Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/DB", "root", "root");

String s="SELECT * FROM ROOT.USERTABLE";

PreparedStatement stmt = con.prepareStatement(s);

ResultSet rs = stmt.executeQuery();

boolean flag = false;

while (rs.next()) {

String userid = rs.getString("USERID");

String p1 = rs.getString("PASS");

if(id.equals(userid)&&p.equals(p1))

JOptionPane.showMessageDialog(null,"welcome");

new main().setVisible(true);

flag = true;

dispose();

- 30 -
}

if(!flag)

JOptionPane.showMessageDialog(null,"Wrong ID or Password");

} catch (SQLException ex) {

private void exitButtonActionPerformed(java.awt.event.ActionEvent evt) {

dispose();

private void IDActionPerformed(java.awt.event.ActionEvent evt) {

public static void main(String args[]) {

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.

* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

- 31 -
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new Login().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JTextField ID;

private javax.swing.JButton LoginButton;

private javax.swing.JButton exitButton;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JPasswordField pass;

// End of variables declaration

 Main Frame

- 32 -
import javax.swing.ImageIcon;

import javax.swing.JLabel;

public class main extends javax.swing.JFrame {

public main() {

initComponents();

B();

setLocationRelativeTo(null);

public void B()

JLabel b = new JLabel(new ImageIcon(getClass().getClassLoader().getResource("images/main.jpg")));

b.setBounds(0, 0, 600, 404);

getContentPane().add(b);

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">

private void initComponents() {

jDialog1 = new javax.swing.JDialog();

jMenuItem5 = new javax.swing.JMenuItem();

jMenuBar1 = new javax.swing.JMenuBar();

UpdateCrim = new javax.swing.JMenu();

AddCrim = new javax.swing.JMenuItem();

viewCrim = new javax.swing.JMenuItem();

updateCrim = new javax.swing.JMenuItem();

jMenu3 = new javax.swing.JMenu();

ChangePassword = new javax.swing.JMenuItem();

- 33 -
jMenu1 = new javax.swing.JMenu();

AddFir = new javax.swing.JMenuItem();

viewFir = new javax.swing.JMenuItem();

Udatefir = new javax.swing.JMenuItem();

javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());

jDialog1.getContentPane().setLayout(jDialog1Layout);

jDialog1Layout.setHorizontalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGap(0, 400, Short.MAX_VALUE)

);

jDialog1Layout.setVerticalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGap(0, 300, Short.MAX_VALUE)

);

jMenuItem5.setText("jMenuItem5");

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

setResizable(false);

UpdateCrim.setText("Criminal Record");

AddCrim.setText("Add");

AddCrim.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

AddCrimActionPerformed(evt);

});

UpdateCrim.add(AddCrim);

- 34 -
viewCrim.setText("View");

viewCrim.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

viewCrimActionPerformed(evt);

});

UpdateCrim.add(viewCrim);

updateCrim.setText("Update");

updateCrim.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

updateCrimActionPerformed(evt);

});

UpdateCrim.add(updateCrim);

jMenuBar1.add(UpdateCrim);

jMenu3.setText("Change Password");

ChangePassword.setText("Change");

ChangePassword.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

ChangePasswordActionPerformed(evt);

});

jMenu3.add(ChangePassword);

jMenuBar1.add(jMenu3);

- 35 -
jMenu1.setText("FIR");

AddFir.setText("Add");

AddFir.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

AddFirActionPerformed(evt);

});

jMenu1.add(AddFir);

viewFir.setText("View");

viewFir.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

viewFirActionPerformed(evt);

});

jMenu1.add(viewFir);

Udatefir.setText("Update");

Udatefir.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

UdatefirActionPerformed(evt);

});

jMenu1.add(Udatefir);

jMenuBar1.add(jMenu1);

setJMenuBar(jMenuBar1);

- 36 -
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGap(0, 600, Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGap(0, 367, Short.MAX_VALUE)

);

pack();

}// </editor-fold>

private void UdatefirActionPerformed(java.awt.event.ActionEvent evt) {

new UpdateFIR().setVisible(true);

private void viewFirActionPerformed(java.awt.event.ActionEvent evt) {

new ViewFIR().setVisible(true);

private void AddFirActionPerformed(java.awt.event.ActionEvent evt) {

new Fir().setVisible(true);

- 37 -
private void AddCrimActionPerformed(java.awt.event.ActionEvent evt) {

new newcriminal().setVisible(true);

private void viewCrimActionPerformed(java.awt.event.ActionEvent evt) {

new ViewCriminal().setVisible(true);

private void updateCrimActionPerformed(java.awt.event.ActionEvent evt) {

new Updatecriminal().setVisible(true);

private void ChangePasswordActionPerformed(java.awt.event.ActionEvent evt) {

new ChangePassword().setVisible(true);

public static void main(String args[]) {

/* Set the Nimbus look and feel */

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.

* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

- 38 -
javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new main().setVisible(true);

});

private javax.swing.JMenuItem AddCrim;

private javax.swing.JMenuItem AddFir;

private javax.swing.JMenuItem ChangePassword;

private javax.swing.JMenuItem Udatefir;

private javax.swing.JMenu UpdateCrim;

private javax.swing.JDialog jDialog1;

private javax.swing.JMenu jMenu1;

- 39 -
private javax.swing.JMenu jMenu3;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem5;

private javax.swing.JMenuItem updateCrim;

private javax.swing.JMenuItem viewCrim;

private javax.swing.JMenuItem viewFir;

 New criminal

import datePackage.DateLabelFormatter;

import java.awt.event.KeyEvent;

import java.sql.*;

import java.util.Properties;

import java.util.logging.Level;

import java.util.logging.Logger;

import javax.swing.ImageIcon;

import javax.swing.JLabel;

import javax.swing.JOptionPane;

import org.jdatepicker.impl.JDatePanelImpl;

import org.jdatepicker.impl.JDatePickerImpl;

import org.jdatepicker.impl.SqlDateModel;

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

- 40 -
/**

* @author prarthana

*/

public class newcriminal extends javax.swing.JFrame {

JDatePanelImpl datePanel1,datePanel2,datePanel3;

JDatePickerImpl datePicker1,datePicker2,datePicker3;

SqlDateModel dateModel1, dateModel2 , dateModel3 ;

public newcriminal() {

initComponents();

init2();

B();

public void B()

JLabel l = new JLabel(new


ImageIcon(getClass().getClassLoader().getResource("images/criminal.jpg")));

l.setBounds(320, 100, 960, 576);

getContentPane().add(l);

JLabel b = new JLabel(new


ImageIcon(getClass().getClassLoader().getResource("images/black.jpg")));

b.setBounds(0, 0, 960, 800);

getContentPane().add(b);

private void init2(){

- 41 -
dateModel1 = new SqlDateModel();

dateModel2 = new SqlDateModel();

dateModel3 = new SqlDateModel();

Properties p = new Properties();

p.put("text.today", "Today");

p.put("text.month", "Month");

p.put("text.year", "Year");

datePanel1 = new JDatePanelImpl(dateModel1, p);

datePanel2 = new JDatePanelImpl(dateModel2, p);

datePanel3 = new JDatePanelImpl(dateModel3, p);

datePicker1 = new JDatePickerImpl(datePanel1, new DateLabelFormatter());

datePicker2 = new JDatePickerImpl(datePanel2, new DateLabelFormatter());

datePicker3 = new JDatePickerImpl(datePanel3, new DateLabelFormatter());

datePicker1.setBounds(161, 160, 240, 30);

datePicker2.setBounds(161, 338, 240, 30);

datePicker3.setBounds(161, 492, 240, 30);

getContentPane().add(datePicker1);

getContentPane().add(datePicker2);

getContentPane().add(datePicker3);

/**

* This method is called from within the constructor to initialize the form.

* WARNING: Do NOT modify this code. The content of this method is always

* regenerated by the Form Editor.

*/

@SuppressWarnings("unchecked")

// <editor-fold defaultstate="collapsed" desc="Generated Code">

private void initComponents() {

- 42 -
jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jLabel6 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

jLabel8 = new javax.swing.JLabel();

CloseCriminal = new javax.swing.JButton();

NameTextField = new javax.swing.JTextField();

mRadioB = new javax.swing.JRadioButton();

fRadioB = new javax.swing.JRadioButton();

addTextField = new javax.swing.JTextField();

OccupationTextField = new javax.swing.JTextField();

PunishmentTextField = new javax.swing.JTextField();

typeofcrimTextField = new javax.swing.JComboBox();

jLabel10 = new javax.swing.JLabel();

jLabel9 = new javax.swing.JLabel();

jLabel11 = new javax.swing.JLabel();

arrestlocationTextField = new javax.swing.JTextField();

jScrollPane2 = new javax.swing.JScrollPane();

DetailsOfCrimTextField = new javax.swing.JTextArea();

jLabel12 = new javax.swing.JLabel();

addbutton = new javax.swing.JButton();

unemp = new javax.swing.JRadioButton();

emp = new javax.swing.JRadioButton();

lockerNumField = new javax.swing.JTextField();

jLabel13 = new javax.swing.JLabel();

jLabel14 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

- 43 -
jLabel2.setForeground(new java.awt.Color(255, 255, 255));

jLabel2.setText("Name :");

jLabel3.setForeground(new java.awt.Color(255, 255, 255));

jLabel3.setText("Gender :");

jLabel4.setForeground(new java.awt.Color(255, 255, 255));

jLabel4.setText("D.O.B :");

jLabel5.setForeground(new java.awt.Color(255, 255, 255));

jLabel5.setText("Address :");

jLabel6.setForeground(new java.awt.Color(255, 255, 255));

jLabel6.setText("Occupation :");

jLabel7.setForeground(new java.awt.Color(255, 255, 255));

jLabel7.setText("Type of crime :");

jLabel8.setForeground(new java.awt.Color(255, 255, 255));

jLabel8.setText("Punishment :");

CloseCriminal.setText("Close");

CloseCriminal.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

CloseCriminalActionPerformed(evt);

});

NameTextField.addKeyListener(new java.awt.event.KeyAdapter() {

- 44 -
public void keyTyped(java.awt.event.KeyEvent evt) {

NameTextFieldKeyTyped(evt);

});

mRadioB.setForeground(new java.awt.Color(255, 255, 255));

mRadioB.setSelected(true);

mRadioB.setText("Male");

mRadioB.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

mRadioBActionPerformed(evt);

});

fRadioB.setForeground(new java.awt.Color(255, 255, 255));

fRadioB.setText("Female");

fRadioB.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

fRadioBActionPerformed(evt);

});

OccupationTextField.setEditable(false);

OccupationTextField.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

OccupationTextFieldActionPerformed(evt);

});

OccupationTextField.addKeyListener(new java.awt.event.KeyAdapter() {

public void keyTyped(java.awt.event.KeyEvent evt) {

- 45 -
OccupationTextFieldKeyTyped(evt);

});

typeofcrimTextField.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Robbery",


"Assault", "Kidnapping", "Burglary", "Forgery", "Conspiracy" }));

typeofcrimTextField.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

typeofcrimTextFieldActionPerformed(evt);

});

jLabel10.setForeground(new java.awt.Color(255, 255, 255));

jLabel10.setText("Details of Crime :");

jLabel9.setForeground(new java.awt.Color(255, 255, 255));

jLabel9.setText("Arrest Date :");

jLabel11.setForeground(new java.awt.Color(255, 255, 255));

jLabel11.setText("Arrest Location :");

arrestlocationTextField.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

arrestlocationTextFieldActionPerformed(evt);

});

DetailsOfCrimTextField.setColumns(20);

DetailsOfCrimTextField.setRows(5);

jScrollPane2.setViewportView(DetailsOfCrimTextField);

- 46 -
jLabel12.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N

jLabel12.setForeground(new java.awt.Color(255, 255, 255));

jLabel12.setText("NEW CRIMINAL RECORD");

addbutton.setText("ADD");

addbutton.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

addbuttonActionPerformed(evt);

});

unemp.setForeground(new java.awt.Color(255, 255, 255));

unemp.setSelected(true);

unemp.setText("Unemployed");

unemp.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

unempActionPerformed(evt);

});

emp.setForeground(new java.awt.Color(255, 255, 255));

emp.setText("Employed");

emp.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

empActionPerformed(evt);

});

jLabel13.setForeground(new java.awt.Color(255, 255, 255));

jLabel13.setText("Locker Number:");

- 47 -
jLabel14.setForeground(new java.awt.Color(255, 255, 255));

jLabel14.setText("Release Date: ");

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel14)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(89, 89, 89)

.addComponent(jLabel2))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()

.addContainerGap()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING)))))

.addGap(29, 29, 29)

- 48 -
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(10, 10, 10)

.addComponent(mRadioB)

.addGap(18, 18, 18)

.addComponent(fRadioB)

.addContainerGap(352, Short.MAX_VALUE))

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addComponent(unemp)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(emp))

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(layout.createSequentialGroup()

.addComponent(addbutton)

.addGap(24, 24, 24)

.addComponent(CloseCriminal))

.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)

.addComponent(NameTextField, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(addTextField, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(typeofcrimTextField,
javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)

.addComponent(arrestlocationTextField,
javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(PunishmentTextField,
javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jScrollPane2)

.addComponent(OccupationTextField,
javax.swing.GroupLayout.Alignment.LEADING)

- 49 -
.addComponent(lockerNumField,
javax.swing.GroupLayout.Alignment.LEADING))))

.addGap(0, 0, Short.MAX_VALUE))))

.addGroup(layout.createSequentialGroup()

.addGap(177, 177, 177)

.addComponent(jLabel12)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(23, 23, 23)

.addComponent(jLabel12)

.addGap(37, 37, 37)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(NameTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2))

.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(fRadioB)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(mRadioB)

.addComponent(jLabel3)))

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(50, 50, 50)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

- 50 -
.addComponent(addTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel5)))

.addGroup(layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jLabel4)))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(unemp)

.addComponent(emp)

.addComponent(jLabel6))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(OccupationTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(11, 11, 11)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(typeofcrimTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel7))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jLabel9)

.addGap(15, 15, 15)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(arrestlocationTextField,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel11))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(PunishmentTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addComponent(jLabel8))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

- 51 -
.addComponent(lockerNumField, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel13))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel14)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23,
Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 100,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel10))

.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(CloseCriminal)

.addComponent(addbutton))

.addContainerGap())

);

pack();

}// </editor-fold>

private void CloseCriminalActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

dispose();

private void typeofcrimTextFieldActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void mRadioBActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

- 52 -
fRadioB.setSelected(false);

private void fRadioBActionPerformed(java.awt.event.ActionEvent evt) {

mRadioB.setSelected(false);

private void arrestlocationTextFieldActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void OccupationTextFieldActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void addbuttonActionPerformed(java.awt.event.ActionEvent evt) {

Date dob = dateModel1.getValue();

Date arr =dateModel2.getValue();

Date reldate = dateModel3.getValue();

try {

Class.forName("org.apache.derby.jdbc.EmbeddedDriver");

} catch (ClassNotFoundException ex) {

Logger.getLogger(newcriminal.class.getName()).log(Level.SEVERE, null, ex);

try {

Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/DB", "root",


"root");

- 53 -
String gender;

if(mRadioB.isSelected()==true)

gender="Male";

else

gender="Female";

String s ="INSERT INTO


ROOT.CRIMINALTABLE(NAME,GENDER,DOB,ADDRESS,OCCUPATION,TYPEOFCRIME,ARR
ESTDATE,ARRESTLOCATION,PUNISH,LOCKER,RELEASE,DETAILSOFCRIM) "

+ "VALUES(?,?,?,?,?,?,?,?,?,?,?,?)";

PreparedStatement stmt = con.prepareStatement(s);

stmt.setString(1,NameTextField.getText());

stmt.setString(2,gender);

stmt.setDate(3,dob);

stmt.setString(4,addTextField.getText());

if(unemp.isSelected()==true)

stmt.setString(5,"Unemployed");

else

stmt.setString(5,OccupationTextField.getText());

stmt.setString(6,typeofcrimTextField.getSelectedItem().toString());

stmt.setDate(7,arr);

stmt.setString(8,arrestlocationTextField.getText());

stmt.setString(9,PunishmentTextField.getText());

stmt.setString(10,lockerNumField.getText());

stmt.setDate(11,reldate);

stmt.setString(12,DetailsOfCrimTextField.getText());

stmt.executeUpdate();

- 54 -
JOptionPane.showMessageDialog(null, "Record Added");

dispose();

} catch (SQLException ex) {

Logger.getLogger(newcriminal.class.getName()).log(Level.SEVERE, null, ex);

private void NameTextFieldKeyTyped(java.awt.event.KeyEvent evt) {

char c = evt.getKeyChar();

if(!Character.isAlphabetic(c)&& (c != KeyEvent.VK_BACK_SPACE)&& (c !=
KeyEvent.VK_SPACE)) {

evt.consume();

getToolkit().beep();

private void OccupationTextFieldKeyTyped(java.awt.event.KeyEvent evt) {

char c = evt.getKeyChar();

if(!Character.isAlphabetic(c)&& (c != KeyEvent.VK_BACK_SPACE)&& (c !=
KeyEvent.VK_SPACE)){

evt.consume();

getToolkit().beep();

private void empActionPerformed(java.awt.event.ActionEvent evt) {

if(emp.isSelected()==false)

- 55 -
{

unemp.setSelected(true);

OccupationTextField.setEditable(false);

OccupationTextField.setText("");

else

unemp.setSelected(false);

OccupationTextField.setEditable(true);

private void unempActionPerformed(java.awt.event.ActionEvent evt) {

if(unemp.isSelected()==true)

emp.setSelected(false);

OccupationTextField.setEditable(false);

OccupationTextField.setText("");

else

emp.setSelected(true);

OccupationTextField.setEditable(true);

- 56 -
public static void main(String args[]) {

/* Set the Nimbus look and feel */

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.

* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info :


javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(newcriminal.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(newcriminal.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(newcriminal.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(newcriminal.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

//</editor-fold>

- 57 -
/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new newcriminal().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton CloseCriminal;

private javax.swing.JTextArea DetailsOfCrimTextField;

private javax.swing.JTextField NameTextField;

private javax.swing.JTextField OccupationTextField;

private javax.swing.JTextField PunishmentTextField;

private javax.swing.JTextField addTextField;

private javax.swing.JButton addbutton;

private javax.swing.JTextField arrestlocationTextField;

private javax.swing.JRadioButton emp;

private javax.swing.JRadioButton fRadioB;

private javax.swing.JScrollPane jScrollPane2;

private javax.swing.JTextField lockerNumField;

private javax.swing.JRadioButton mRadioB;

private javax.swing.JComboBox typeofcrimTextField;

private javax.swing.JRadioButton unemp;

// End of variables declaration

- 58 -
 Bibliography

1) Herbert Schildt, The Complete Reference – Java 2 Fifth Edition

2) Website – www.tutorialpoint.com/swing

3) Website – www.javapoint.com/java-swing

4) Website – www.codejava.net/java-se/jdbc/connect-to-apache-derby-java-

db-via-jdbc

- 59 -

You might also like