Info Project2
Info Project2
FRONT END:
The Front End is the user interface that the user sees and this end is
responsible for interacting with the user. The Front End is responsible
for receiving users queries, requests etc, and passing it over to the
Back End. The Front End basically includes graphical user interface and
the input form through which the user interacts with the system.
BACK END:
The Back End manages the interface with which the user interacts, the
Back End handles all the database access through one or more servers.
A server is a special computer that is responsible for serving requests
made to it. That is the part of the program that does the real processing
work or gets it done from a server. After processing the users requests
in queries, the server returns the result to the Back End which is
interpreted and passed on to the Front End.
Page | 1
INTRODUCTION
The World Wide Web has become tremendously popular over the last
years, and currently most of the airlines have made provision for online
reservation of their flights. My project intends to serve these purposes.
Page | 2
MY SQL DATABASE
AND TABLES
Page | 3
DATABASE NAME: AirReservation
Page | 4
JAVA FRAMES AND
SOURCE CODE
Page | 5
WELCOME SCREEN
Source Code:
import javax.swing.JOptionPane;
Page | 6
private void btnContinueActionPerformed(java.awt.event.ActionEvent
evt) {
this.setVisible(false);
new Login().setVisible(true);
if (x==JOptionPane.YES_OPTION)
System.exit(0);
try {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break; } }
Page | 7
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Welcome.class.getName()).log(java.util.lo
gging.Level.SEVERE, null, ex);
java.awt.EventQueue.invokeLater(new Runnable() {
Page | 8
LOGIN SCREEN
Source Code:
import java.sql.*;
import javax.swing.JOptionPane;
Page | 9
public class Login extends javax.swing.JFrame {
Connection con;
Statement stmt;
ResultSet rs;
public Login() {
initComponents();
try {
Class.forName("java.sql.Driver");
con=DriverManager.getConnection(DB_URL,user,pass);
stmt = con.createStatement(); }
catch(Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
String usern,pass,sql;
usern=TFUsern.getText();
pass=PFPass.getText();
Page | 10
try{
rs=stmt.executeQuery(sql);
JOptionPane.showMessageDialog(null,"Login successful!");
new Main_menu().setVisible(true);
this.setVisible(false);
catch(Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
new Registration().setVisible(true);
this.setVisible(false);
java.awt.EventQueue.invokeLater(new Runnable() {
Page | 11
private javax.swing.JPasswordField PFPass;
Page | 12
REGISTERATION SCREEN
Source Code:
import java.sql.*;
import javax.swing.JOptionPane;
Connection con;
Statement stmt;
ResultSet rs;
public Registration() {
initComponents();
try {
Class.forName("java.sql.Driver");
con=DriverManager.getConnection(DB_URL,user,pass);
Page | 14
stmt = con.createStatement(); }
catch(Exception e)
{ JOptionPane.showMessageDialog(this,e.getMessage());}
new Login().setVisible(true);
this.setVisible(false);
new Terms_and_conditions().setVisible(true);
String firstn,surn,gender=null,phonen,eid,username,pass,confirmpass,sql;
int age;
firstn=TFFirstName.getText();
surn=TFSurname.getText();
phonen=TFPhoneNo.getText();
eid=TFEmailID.getText();
username=TFUsername.getText();
pass=(PFPassword.getText());
Page | 15
confirmpass=(PFConPassword.getText());
age=Integer.parseInt(TFAge.getText());
if (RBM.isSelected()==true)
gender="Male";
else if (RBF.isSelected()==true)
gender="Female";
if (!pass.equals(confirmpass))
if ((age<18||!CBTaC.isSelected()&&(age<18&&!CBTaC.isSelected())))
JOptionPane.showMessageDialog(null,"Registration unsuccessful.\nPlease
make sure you agree with the Terms & Conditions and are 18 or above years
old.");
if (age>=18&&CBTaC.isSelected()&&(pass.equals(confirmpass)))
new Login().setVisible(true);
this.setVisible(false);}
try{
int rs=stmt.executeUpdate(sql);}
Page | 16
catch(Exception e)
{ JOptionPane.showMessageDialog(this,e.getMessage());
String ctc=(String)CBCC.getSelectedItem();
if ("Kuwait".equals(ctc))
TFPhoneNo.setText("965+ ");
if ("Bahrain".equals(ctc))
TFPhoneNo.setText("973+ ");
if ("Egypt".equals(ctc))
TFPhoneNo.setText("20+ ");
if ("Iran".equals(ctc))
TFPhoneNo.setText("98+ ");
if ("Iraq".equals(ctc))
TFPhoneNo.setText("964+ ");
if ("Israel".equals(ctc))
TFPhoneNo.setText("972+ ");
if ("Jordan".equals(ctc))
TFPhoneNo.setText("962+ ");
if ("Lebanon".equals(ctc))
TFPhoneNo.setText("961+ ");
Page | 17
if ("Oman".equals(ctc))
TFPhoneNo.setText("968+ ");
if ("Qatar".equals(ctc))
TFPhoneNo.setText("974+ ");
if ("Saudi Arabia".equals(ctc))
TFPhoneNo.setText("966+ ");
if ("Syria".equals(ctc))
TFPhoneNo.setText("963+ ");
if ("Turkey".equals(ctc))
TFPhoneNo.setText("90+ ");
TFPhoneNo.setText("971+ ");
if ("Yemen".equals(ctc))
TFPhoneNo.setText("967+ ");
if ("Cyprus".equals(ctc))
TFPhoneNo.setText("357+ ");
try {
Page | 18
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break; } }
java.util.logging.Logger.getLogger(Registration.class.getName()).log(java.util.
logging.Level.SEVERE, null, ex);
java.awt.EventQueue.invokeLater(new Runnable() {
Page | 19
private javax.swing.JRadioButton RBF;
Page | 21
MAIN MENU SCREEN
Source Code:
import javax.swing.JOptionPane;
initComponents(); }
new Reservation_form().setVisible(true);
this.setVisible(false);
this.setVisible(false);
new Exit().setVisible(true);
if (x==JOptionPane.YES_OPTION)
new Login().setVisible(true);
this.setVisible(false);
Page | 23
private void btnResvUpdateActionPerformed(java.awt.event.ActionEvent
evt) {
new Update_reservation().setVisible(true);
this.setVisible(false);
new Cancel_reservations().setVisible(true);
this.setVisible(false);
new Search_reservations().setVisible(true);
this.setVisible(false);
new Fare_enquiry().setVisible(true);
this.setVisible(false);
Page | 24
public static void main(String args[]) {
try {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break; } }
java.awt.EventQueue.invokeLater(new Runnable() {
Page | 25
private javax.swing.JButton btnExit;
Page | 26
RESERVATION FORM SCREEN
Source Code:
import java.sql.*;
import javax.swing.JOptionPane;
Connection con;
Statement stmt;
ResultSet rs;
double tf,fad,fch,fin;
String cc,tt,sql;
public Reservation_form() {
initComponents();
Page | 28
try {
Class.forName("java.sql.Driver");
con=DriverManager.getConnection(DB_URL,user,pass);
stmt = con.createStatement(); }
catch(Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
this.setVisible(false);
new Main_menu().setVisible(true);
String pname,ori,dest,dpdate,retdate,curr=null;
int pid,ad,ch,in,rs;
pid=Integer.parseInt(TFPassID.getText());
ad=Integer.parseInt(TFAD.getText());
ch=Integer.parseInt(TFCH.getText());
in=Integer.parseInt(TFIN.getText());
Page | 29
pname=TFPassName.getText();
dpdate=TFDepDate.getText();
retdate=TFRetDate.getText();
ori=(String)CBOri.getSelectedItem();
dest=(String)CBDest.getSelectedItem();
if(("Bahrain".equals(ori)&&dest.equals("Kuwait"))||("Kuwait".equals(ori)&&
dest.equals("Bahrain")));
{ fad= 120*ad;
fch+= 90*ch;
fin+= 65*in; }
if(("Bahrain".equals(ori)&&dest.equals("Lebanon"))||("Lebanon".equals(ori)
&&dest.equals("Bahrain")));
{ fad= 120*ad;
fch+= 90*ch;
fin+= 65*in; }
if(("Kuwait".equals(ori)&&dest.equals("Lebanon"))||("Lebanon".equals(ori)
&&dest.equals("Kuwait")));
{ fad= 120*ad;
fch+= 90*ch;
fin+= 65*in; }
Page | 30
if(("Kuwait".equals(ori)&&dest.equals("Bahrain"))||("Bahrain".equals(ori)&
&dest.equals("Kuwait")));
{ fad= 120*ad;
fch+= 90*ch;
fin+= 65*in; }
if(("Lebanon".equals(ori)&&dest.equals("Bahrain"))||("Bahrain".equals(ori)
&&dest.equals("Bahrain")));
{ fad= 120*ad;
fch+= 90*ch;
fin+= 65*in; }
if(("Lebanon".equals(ori)&&dest.equals("Kuwait"))||("Kuwait".equals(ori)&
&dest.equals("Lebanon")));
{ fad= 120*ad;
fch+= 90*ch;
fin+= 65*in; }
Page | 31
else if (dest.equals(ori))
if (TFPassName.getText().trim().equals(""))
if
(TFDepDate.getText().trim().equals("")&&TFRetDate.getText().trim().equals(
""))
else if (TFDepDate.getText().trim().equals(""))
else if (TFRetDate.getText().trim().equals(""))
if (!RBOneW.isSelected()&&!RBRoT.isSelected())
if
(!RBFC.isSelected()&&!RBBC.isSelected()&&!RBPEC.isSelected()&&!RBEC.isS
elected())
if (RBFC.isSelected())
{ cc="First Class";
fad+=80;
Page | 32
fch+=65;
fin+=45; }
else if (RBBC.isSelected())
{ cc="Business Class";
fad+=70;
fch+=55;
fin+=35; }
else if (RBPEC.isSelected())
fad+=50;
fch+=35;
fin+=15; }
else if (RBEC.isSelected())
cc="Economy Class";
if (RBOneW.isSelected())
{ tt="One-Way";
tf=fad+fch+fin; }
else if(RBRoT.isSelected())
{ tt="Round-Trip";
tf=fad+fch+fin*2; }
Page | 33
if("Kuwait".equals(ori))
if("Bahrain".equals(ori))
if("Lebanon".equals(ori))
if (!dest.equals(ori)&&!"Select Origin".equals(ori)&&!"Select
Destination".equals(dest)&&(!TFPassName.getText().trim().equals(""))&&((!
TFDepDate.getText().trim().equals(""))||((RBRoT.isSelected()&&!TFRetDate.
getText().trim().equals(""))))&&(RBOneW.isSelected()||RBRoT.isSelected())
&&(RBFC.isSelected()||RBBC.isSelected()||RBPEC.isSelected()||RBEC.isSele
cted())&&(!TFAD.getText().trim().equals("")||!TFAD.getText().equals("0")))
TFTotF.setText(""+tf+curr);
try{
if (!dest.equals(ori)&&!"Select Origin".equals(ori)&&!"Select
Destination".equals(dest)&&(!TFPassName.getText().trim().equals(""))&&((!
TFDepDate.getText().trim().equals(""))||((RBRoT.isSelected()&&!TFRetDate.
getText().trim().equals(""))))&&(RBOneW.isSelected()||RBRoT.isSelected())
&&(RBFC.isSelected()||RBBC.isSelected()||RBPEC.isSelected()||RBEC.isSele
cted())&&(!TFAD.getText().trim().equals("")||!TFAD.getText().equals("0")))
rs= stmt.executeUpdate(sql);
Page | 34
JOptionPane.showMessageDialog(null,"Congratulations!\nYour reservation
has been booked sucessfully!\nYour total fare is "+tf+""+curr+" only."); }
catch(Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
TFPassID.setText("");
TFPassName.setText("");
TFDepDate.setText("");
TFRetDate.setText("");
TFAD.setText("");
TFCH.setText("");
TFIN.setText("");
TFTotF.setText("");
BG1.clearSelection();
BG2.clearSelection();
CBOri.setSelectedIndex(0);
CBDest.setSelectedIndex(0);
Page | 35
private void RBOneWActionPerformed(java.awt.event.ActionEvent evt) {
if (RBOneW.isSelected()==true)
TFRetDate.setEnabled(false);
TFRetDate.setText("0001-01-01");
if (RBRoT.isSelected()==true)
TFRetDate.setEnabled(true);
TFRetDate.setText("");
if (RBFC.isSelected()&&TFCH.getText().trim().equals(""))
TFCH.setText("0");
if (TFIN.getText().trim().equals(""))
TFIN.setText("0");
if (RBBC.isSelected()&&TFCH.getText().trim().equals(""))
TFCH.setText("0");
Page | 36
if (TFIN.getText().trim().equals(""))
TFIN.setText("0");
if (RBPEC.isSelected()&&TFCH.getText().trim().equals(""))
TFCH.setText("0");
if (TFIN.getText().trim().equals(""))
TFIN.setText("0");
if (RBEC.isSelected()&&TFCH.getText().trim().equals(""))
TFCH.setText("0");
if (TFIN.getText().trim().equals(""))
TFIN.setText("0");
try {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
Page | 37
break; } }
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
Page | 38
private javax.swing.JRadioButton RBEC;
Page | 40
UPDATE RESERVATION SCREEN
Source Code:
import java.sql.*;
import javax.swing.JOptionPane;
Connection con;
Statement stmt;
ResultSet rs;
String na,ori,dest,depdate,retdate,cc,tt,sql,curr=null;
double tf,fad,fch,fin,totf;
int id,ad,ch,in,noa,noc,noi;
public Update_reservation() {
initComponents();
try {
Class.forName("java.sql.Driver");
Page | 42
String user = "root";
con=DriverManager.getConnection(DB_URL,user,pass);
stmt = con.createStatement(); }
catch(Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
this.setVisible(false);
new Main_menu().setVisible(true);
TFPassID.setText("");
TFPassName.setText("");
TFDest.setText("");
TFOri.setText("");
TFDepDate.setText("");
TFRetDate.setText("");
TFAD.setText("");
TFCH.setText("");
Page | 43
TFIN.setText("");
TFCC.setText("");
TFTT.setText("");
TFTotF.setText("");
id=Integer.parseInt(TFPassID.getText());
try{
rs=stmt.executeQuery(sql);
if(rs.next()) {
na=rs.getString(2);
ori=rs.getString(3);
dest=rs.getString(4);
depdate=rs.getString(5);
retdate=rs.getString(6);
noa=rs.getInt(7);
noc=rs.getInt(8);
noi=rs.getInt(9);
cc=rs.getString(10);
tt=rs.getString(11);
Page | 44
totf=rs.getDouble(12);
TFPassName.setText(""+na);
TFDest.setText(dest);
TFOri.setText(ori);
TFDepDate.setText(depdate);
TFRetDate.setText(retdate);
TFAD.setText(""+noa);
TFCH.setText(""+noc);
TFIN.setText(""+noi);
TFCC.setText(cc);
TFTT.setText(tt);
TFTotF.setText(""+totf); }
} catch (Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
int rs;
id=Integer.parseInt(TFPassID.getText());
ad=Integer.parseInt(TFAD.getText());
ch=Integer.parseInt(TFCH.getText());
in=Integer.parseInt(TFIN.getText());
Page | 45
tf=Double.parseDouble(TFTotF.getText());
na=TFPassName.getText();
ori=TFOri.getText();
dest=TFDest.getText();
depdate=TFDepDate.getText();
retdate=TFRetDate.getText();
cc=TFCC.getText();
tt=TFTT.getText();
if(("Bahrain".equals(ori)&&dest.equals("Kuwait"))||("Kuwait".equals(ori)&&
dest.equals("Bahrain")));
{ fad= 120*ad;
fch+= 90*ch;
fin+= 65*in; }
if(("Bahrain".equals(ori)&&dest.equals("Lebanon"))||("Lebanon".equals(ori)
&&dest.equals("Bahrain")));
{ fad= 120*ad;
fch+= 90*ch;
fin+= 65*in; }
if(("Kuwait".equals(ori)&&dest.equals("Lebanon"))||("Lebanon".equals(ori)
&&dest.equals("Kuwait")));
{ fad= 120*ad;
fch+= 90*ch;
Page | 46
fin+= 65*in; }
if(("Kuwait".equals(ori)&&dest.equals("Bahrain"))||("Bahrain".equals(ori)&
&dest.equals("Kuwait")));
{ fad= 120*ad;
fch+= 90*ch;
fin+= 65*in; }
if(("Lebanon".equals(ori)&&dest.equals("Bahrain"))||("Bahrain".equals(ori)
&&dest.equals("Bahrain")));
{ fad= 120*ad;
fch+= 90*ch;
fin+= 65*in; }
if(("Lebanon".equals(ori)&&dest.equals("Kuwait"))||("Kuwait".equals(ori)&
&dest.equals("Lebanon")));
switch (cc) {
fad+=80;
fch+=65;
fin+=45;
break;
fch+=55;
fin+=35;
break;
fad+=50;
fch+=35;
fin+=15;
break; }
if("Kuwait".equals(ori)||"kuwait".equals(ori))
if("Bahrain".equals(ori)||"bahrain".equals(ori))
if("Lebanon".equals(ori)||"egypt".equals(ori))
tf=fad+fch+fin;
tf=fad+fch+fin*2;
Page | 48
TFTotF.setText(""+tf+curr);
try {
rs=stmt.executeUpdate(sql);
catch (Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
try {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break; } }
Page | 49
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Update_reservation.class.getName()).log(j
ava.util.logging.Level.SEVERE, null, ex);
java.awt.EventQueue.invokeLater(new Runnable() {
Page | 52
SEARCH RESERVATIONS SCREEN
Source Code:
import java.sql.*;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
Connection con;
Statement stmt;
Page | 53
ResultSet rs;
public Search_reservations() {
initComponents();
try {
Class.forName("java.sql.Driver");
con=DriverManager.getConnection(DB_URL,user,pass);
stmt=con.createStatement(); }
catch(Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
this.setVisible(false);
new Main_menu().setVisible(true);
DefaultTableModel model=(DefaultTableModel)ResvTable.getModel();
model.setRowCount(0);
}
Page | 54
private void btnSearchActionPerformed(java.awt.event.ActionEvent evt) {
String na,org,dest,depdate,retdate,cc,tt,sql;
int id,noa,noc,noi,count;
double totf;
id=Integer.parseInt(TFPassID.getText());
try {
rs=stmt.executeQuery(sql);
while(rs.next())
{ na=rs.getString(2);
org=rs.getString(3);
dest=rs.getString(4);
depdate=rs.getString(5);
retdate=rs.getString(6);
noa=rs.getInt(7);
noc=rs.getInt(8);
noi=rs.getInt(9);
cc=rs.getString(10);
tt=rs.getString(11);
totf=rs.getDouble(12);
Page | 55
Object arr[]={na,org,dest,depdate,retdate,noa,noc,noi,cc,tt,totf};
dtm.addRow((Object[]) arr); }
count= ResvTable.getModel().getRowCount();
if (count==0)
catch(Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
try {
for(javax.swing.UIManager.LookAndFeelInfoinfo:javax.swing.UIManager.getI
nstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break; } }
} catch(ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Search_reservations.class.getName()).log(
java.util.logging.Level.SEVERE, null, ex);
Page | 56
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Search_reservations.class.getName()).log(
java.util.logging.Level.SEVERE, null, ex);
java.awt.EventQueue.invokeLater(new Runnable() {
Page | 57
FARE ENQUIRY SCREEN
Page | 58
Source Code:
import java.sql.*;
import javax.swing.JOptionPane;
Connection con;
Statement stmt;
ResultSet rs;
public Fare_enquiry() {
initComponents();
try {
Class.forName("java.sql.Driver");
con=DriverManager.getConnection(DB_URL,user,pass);
stmt = con.createStatement(); }
catch(Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
Page | 59
private void btnBackActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new Main_menu().setVisible(true);
String na,dest,depdate,retdate,sql,curr,ori;
double totf;
int id=Integer.parseInt(TFPassID.getText());
try {
rs=stmt.executeQuery(sql);
if(rs.next()) {
na=rs.getString(2);
ori=rs.getString(3);
dest=rs.getString(4);
depdate=rs.getString(5);
retdate=rs.getString(6);
curr=rs.getString(13);
totf=rs.getDouble(12);
TFPassName.setText(na);
Page | 60
TFOri.setText(ori);
TFDest.setText(dest);
TFDepDate.setText(depdate);
TFRetDate.setText(retdate);
TFTotF.setText(""+totf+curr); } }
catch(Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
TFPassID.setText("");
TFPassName.setText("");
TFOri.setText("");
TFDest.setText("");
TFDepDate.setText("");
TFRetDate.setText("");
TFTotF.setText("");
try {
Page | 61
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break; } }
java.awt.EventQueue.invokeLater(new Runnable() {
Page | 62
private javax.swing.JTextField TFPassName;
Page | 63
CANCEL RESERVATION SCREEN
Source Code:
import java.sql.*;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
Connection con;
Statement stmt;
Page | 64
ResultSet rs;
public Cancel_reservations() {
initComponents();
try {
Class.forName("java.sql.Driver");
con=DriverManager.getConnection(DB_URL,user,pass);
stmt = con.createStatement(); }
catch(Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
this.setVisible(false);
new Main_menu().setVisible(true);
DefaultTableModel model=(DefaultTableModel)ResvTable.getModel();
int id=Integer.parseInt(TFPassID.getText());
Page | 65
String sql="Delete from airline_reservation where passport_id="+id+";";
try {
if(x==JOptionPane.YES_OPTION) {
stmt.executeUpdate(sql);
do {
((DefaultTableModel)
ResvTable.getModel()).removeRow(ResvTable.getSelectedRows()[0]); }
JOptionPane.showMessageDialog(null,"Reservation cancelled
successfully!"); }
else if(x==JOptionPane.NO_OPTION); }
catch (Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage()); }
String na,org,dest,depdate,retdate,cc,tt,sql;
int noa,noc,noi,id,count;
double totf;
id=Integer.parseInt(TFPassID.getText());
Page | 66
sql="Select * from airline_reservation where passport_id="+id+";";
try {
rs=stmt.executeQuery(sql);
while(rs.next())
{ na=rs.getString(2);
org=rs.getString(3);
dest=rs.getString(4);
depdate=rs.getString(5);
retdate=rs.getString(6);
noa=rs.getInt(7);
noc=rs.getInt(8);
noi=rs.getInt(9);
cc=rs.getString(10);
tt=rs.getString(11);
totf=rs.getDouble(12);
Object arr[]={na,org,dest,depdate,retdate,noa,noc,noi,cc,tt,totf};
dtm.addRow((Object[]) arr); }
count= ResvTable.getModel().getRowCount();
catch(Exception e) {
Page | 67
JOptionPane.showMessageDialog(this,e.getMessage()); }
try {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break; } }
java.awt.EventQueue.invokeLater(new Runnable() {
Page | 69
EXIT SCREEN
Source Code:
import javax.swing.JOptionPane;
public Exit() {
initComponents(); }
System.exit(0);
}
Page | 70
private void btnNoActionPerformed(java.awt.event.ActionEvent evt) {
new Main_menu().setVisible(true);
this.setVisible(false);
try {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break; } }
Page | 71
java.awt.EventQueue.invokeLater(new Runnable() {
Page | 72
OUTPUTS
Page | 73
STARTUP SCREEN:
ON CLICKING CONTINUE:
Page | 74
ON CLICKING REGISTER:
Page | 75
ON CLICKING <<BACK:
ON CLICKING REGISTER:
Page | 76
ON CLICKING OK:
ON CLICKING LOGIN:
Page | 77
ON CLICKING OK:
Page | 78
ON CLICKING RESERVATION FORM:
Page | 79
ON CLICKING BOOK TICKET:
Page | 80
ON CLICKING CLEAR:
ON CLICKING <<BACK:
Page | 81
ON CLICKING UPDATE RESERVATION:
ON CLICKING LOAD:
Page | 82
ON CLICKING UPDATE:
Page | 83
ON CLICKING CLEAR:
ON CLICKING <<BACK:
Page | 84
ON CLICKING SEARCH RESERVATIONS:
ON CLICKING SEARCH:
ON CLICKING CLEAR:
Page | 85
ON CLICKING <<BACK:
Page | 86
ON CLICKING SEARCH:
ON CLICKING CLEAR:
Page | 87
ON CLICKING <<BACK:
Page | 88
ON CLICKING SEARCH:
Page | 89
ON CLICKING YES:
ON CLICKING <<BACK:
Page | 90
ON CLICKING LOGOUT:
Page | 91
OR ON CLICKING EXIT:
ON CLICKING YES:
Page | 92
BIBLIOGRAPHY
https://en.wikipedia.org/wiki/Airline_reservations_system
https://stackoverflow.com
https://images.google.com/
Informatics Practices Readers XI & XII (NCRT) By Sumita
Arora
AISCCE Practical Project For Informatics Practices (2016-
2017)
Page | 93