varun
varun
Index
DEPARTMENT OF COMPUTER
SUBMITTED BY:
LITERATURE REVIEW
Customer Management: Allow users to manage customer data, including details such as
name, address, contact information, and unique customer identifiers.
Selecting packages: Enable users to select the different package according to their need
for each customer. This can be done by just selecting the book packages option from
dashboard.
Selecting Hotel: : Enable users to select the different package according to their need
for each customer. This can be done by just selecting the packages from package class.
Bill Calculation: Overall, the aim of this project is to allow the user to create the account in
application and select the packages ,hotels and other travelling facilities such as added food
and the quality of service etc. Based on all the services selected by the user and the no of
peoples travelling the bill is calculated during the billing all the selected services are on
the bill.
INTENDED COURSE OUTCOMES
Technical Proficiency
Software Development
Database Management
User Authentication and Authorization
GUI Development:
PROPOSED METHODOLOGY
We have created the Travel and Tour Management Systemby following steps some of the steps are
as follows:
1. We have designed the user interface of Travel and Tour management by using
various Java swing components like Buttons, Labels, Textboxes, Combo Boxes, etc.
2. Then we used CSS for adding a better look and feel to the web pages.
3. Then we have designed the Various Windows projects such as Login page, Signup
page, Main dashboard page, hotel selecting page, package selecting page etc.
4. After that, we have developed the program logic by writing the necessary code to
perform calculations and store data in the database.
5. Then we have tested the program by executing all the possible scenarios and
making sure it works properly and there is no error.
RESOURCES REQUIRED
Sr. Name of Resource / Specification Rema
No. Material rk
1 Computer System with Intel Core I5 and 1
. broad later RAM 8GB,
specifications. Windows 11 and
later versions.
2 Software Visual Studio for 1
. Java development
TO build our project we took the from following links and books such as:
1. The AJP book we can refer to and name of this book is tech max.
In this book we understood how to use Java swing components, database connection and all.
2. We can visit the following
websites
https://copyassignment.com/tarvel-
tour -management-system-project-
in-java/#google_vignette
From this website we understood the concept of Travel Management
System. : https://www.educba.com
From this website we take the knowledge about GUI development using java swing
components.
LATTHE EDUCATION SOCITY’S POLYTECHNIC,
SANGLI
DEPARTMENT OF COMPUTER
SUBMITTED BY:
The rationale for developing an "Travel and Tour Management System in Advanced
Java" project is multifaceted and based on several key factors, each of which contributes to
the importance and relevance of the project. Below are the primary rationales for undertaking
this project:
In summary, the rationale for developing an "Travel and Tour Management System in
Advanced Java" project is grounded in the pursuit of operational efficiency, customer
satisfaction, data management, and compliance with regulations. This project not only
enhances the user response to the website but also contributes to a more efficient, customer-
centric, and environmentally responsible approach to Travel management and data
management.
Reservation and Booking Management: A travel and tour management system allows customers
to make reservations and bookings for flights, hotels, tours, and other travel-related services. This
streamlines the booking process and ensures accurate and up-to-date availability.
Customer Convenience: It provides customers with a user-friendly platform to plan and book
their trips online, which is convenient and accessible 24/7. This can lead to increased customer
satisfaction and loyalty.
Inventory Management: For travel agencies and tour operators, managing the inventory of
available services (e.g., hotel rooms, airline seats, tour slots) is crucial. The system helps in
tracking and updating inventory in real-time.
Payment Processing: The system facilitates secure payment processing, allowing customers to
pay for their bookings online. It can support multiple payment methods, making it convenient for
a diverse range of customers.
Cost Efficiency: It reduces the administrative burden by automating tasks such as booking
confirmation, invoice generation, and financial reporting. This can lead to cost savings for travel
businesses.
Customer Relationship Management (CRM): A travel and tour management system can store
customer data and interactions, allowing travel businesses to provide personalized services a
build long-term relationships with clients.
Marketing and Promotion: It can help in marketing and promoting travel packages and services,
sending out newsletters, and offering discounts or promotions to attract more customers.
Reporting and Analytics: The system generates reports and analytics on various aspects of the
business, helping companies make data-driven decisions and understand market trends.
Resource Allocation: For tour operators, it helps in managing resources such as vehicles, guides,
and equipment efficiently. This ensures that tours are well-organized and meet customer
expectations.
Compliance and Regulation: Travel and tourism are subject to various regulations and
compliance requirements. A management system can help businesses stay in compliance with
relevant laws and regulations.
• The aim of a micro project to create an "Travel and Tour Management Systemin
Advanced Java" could be a more focused objective within a larger course or a shorter
project with specific goals. Here's an example of the aim for a micro project of this
nature:
To develop a functional prototype of an Travel and Tour Management Systemin Advanced
Java that calculates bills based on Hotel and Package selcted rates.
Java is a high-level, class-based, object-oriented programming language that is designed to have as
few implementation dependencies as possible.
It is a general-purpose programming language intended to let programmers write once, run
anywhere (WORA), meaning that compiled Java code can run on all platforms that support
Java without the need to recompile. Java applications are typically compiled to bytecode that
can run on any Java virtual machine (JVM) regardless of the underlying computer
architecture. The syntax of Java is similar to C and C++, but has fewer low-level facilities
than either of them. The Java runtime provides dynamic capabilities (such as reflection and
runtime code modification) that are typically not available in traditional compiled languages.
As of 2019, Java was one of the most popular programming languages in use according to
GitHub, particularly for client–server web applications, with a reported 9 million developers.
The actual methodology followed for a micro project to create an "Travel and Tour Management
Systemin Advanced Java" would be more streamlined and focused compared to a full-scale project.
Below is a simplified methodology that outlines the key steps for such a micro project.
i. Project Initiation: Define the scope and objectives of the micro project, which
should include the specific functionalities to be implemented.
ii. Requirements Specification: Clearly outline the requirements for the
system, focusing on essential features, such as selecting packages, selecting
Hotels, bill calculation, and invoice generation.
iii. Java Programming Skills: The project involves using Java programming
language to develop Travel and Tour Management System, which can
help developers enhance their skills in the language.
iv. System Design and Development Skills: The project involves designing
and developing a system from scratch, which can help developers enhance
their skills in software development, including system architecture, database
design, and user interface design.
v. Testing and Quality Assurance Skills: The project involves various testing
methods to ensure the system meets all the requirements and functions as
expected, which can help developers improve their skills in testing and
quality assurance.
vi. Project Management Skills: The project involves managing the
development process from start to finish, which can help developers enhance
their skills in project management, including planning, resource allocation,
and risk management.
vii. Communication and Collaboration Skills: The project involves working
with stakeholders and team members, which can help developers
enhance their communication and collaboration skills.
RESOURCES REQUIRED
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.*;
public class login extends JFrame implements lbuser.setBounds(60,50,100,20);
ActionListener { jpl2.add(lbuser);
jtf= new JTextField(50);
JButton jb1,jb2,jb3; jtf.setBounds(60,80,200,25);
JTextField jtf,jtf2; jpl2.add(jtf);
login()
{
setSize(900, 400);
setLocation(350,200); JLabel pass= new JLabel("Password :");
setLayout(null); pass.setBounds(60,110,100,20);
setBounds(0,0,1600,1000); jpl2.add(pass);
setBackground(Color.GRAY); jtf2= new JTextField(50);
jtf2.setBounds(60,130,200,25);
getContentPane().setBackground(Color.GRAY); jpl2.add(jtf2);
Sign Up Page:
//image
i1= new lans= new JLabel(" Answer");
ImageIcon(ClassLoader.getSystemResource("ico lans.setBounds(30,140,200,25);
ns/forgotpassword.jpg")); lans.setFont(new
i2=i1.getImage().getScaledInstance(200, Font("Tahoma",Font.BOLD,14));
200, Image.SCALE_DEFAULT); pl.add(lans);
i3= new ImageIcon(i2); anstf= new JTextField();
image= new JLabel(i3); anstf.setBounds(180,140,150,25);
image.setBounds(580,70,200,200); pl.add(anstf);
add(image);
//panel btretive= new JButton("retrive");
pl = new JPanel(); btretive.setBounds(380,140,100,25);
pl.setLayout(null); pl.add(btretive);
pl.setBounds(30,30,500,280); btretive.addActionListener(this);
add(pl);
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==btsearch)
{
try {
conn c= new conn();
String query="select * from account
where username='"+untf.getText()+"'";
ResultSet rs=c.s.executeQuery(query);
while(rs.next())
{
ntf.setText(rs.getString("name"));
sqtf.setText(rs.getString("security"));
}
else if(e.getSource()==btretive)
{
try {
conn c= new conn();
String query="select * from account
where answer='"+anstf.getText()+"'AND
username='"+untf.getText()+"'";
ResultSet rs=c.s.executeQuery(query);
while(rs.next())
{
passtf.setText(rs.getString("password"));
}
Main Dashboard:
} catch (Exception e2) {
import java.awt.*; add(p2);
import java.awt.event.AWTEventListener;
import java.awt.event.ActionEvent; //button
import java.awt.event.ActionListener; addpers= new JButton("Add personal
Details");
import javax.swing.*; addpers.setBounds(0,0,300,50);
public class dashboard extends JFrame addpers.setBackground(new
implements ActionListener { Color(0,0,102));
String username; addpers.setForeground(Color.WHITE);
addpers.setFont(new
JButton Font("Tahoma",Font.PLAIN,20));
addpers,update,viewper,delper,vbookedhotel,che addpers.setMargin(new Insets(0,0,0,30));
ckpakage,bookpackages,viewpackage,viewhotel, addpers.addActionListener(this);
bookhotel,destinations,payment; p2.add(addpers);
dashboard(String username)
{ update= new JButton("Upadate personal
this.username=username; Details");
setBounds(0,0,1600,1000); update.setBounds(0,50,300,50);
setLayout(null); update.setBackground(new Color(0,0,102));
update.setForeground(Color.WHITE);
JPanel p1= new JPanel(); update.setFont(new
p1.setLayout(null); Font("Tahoma",Font.PLAIN,20));
p1.setBackground(new Color(0,0,102)); update.setMargin(new Insets(0,0,0,30));
p1.setBounds(0,0,1600,65); update.addActionListener(this);
add(p1); p2.add(update);
JComboBox comboid;
JRadioButton male,female; txtnm= new JLabel();
JButton btadd,btback; txtnm.setBounds(220,170,150,25);
String username1; add(txtnm);
JLabel setVisible(true);
lblusername,lblid,txtunm,lbname,txtnm,gender,l
blcontry,mobileno;
JTextField jtf1,jtaddress,jtcountry,tfmobile; gender= new JLabel("Gender");
gender.setBounds(30,220,150,25);
addcustomer(String username) add(gender);
{
this.username1=username; male= new JRadioButton("Male" );
setBounds(450,200,900,600); male.setBounds(220,220,100,25);
setLayout(null); add(male);
female= new JRadioButton("FeMale" );
getContentPane().setBackground(Color.WHITE) female.setBounds(320,220,100,25);
; add(female);
ButtonGroup btngr= new ButtonGroup();
lblusername= new JLabel("Userame"); btngr.add(female);
lblusername.setBounds(30,50,150,25); btngr.add(male);
add(lblusername);
} catch (Exception e) {
// TODO: handle exception
}
setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==delete)
{
try {
conn c=new conn();
View Details page:
c.s.executeUpdate("delete from account
where username='"+username1+"'"); import javax.swing.*;
c.s.executeUpdate("delete from customer import java.awt.*;
import java.awt.event.ActionEvent; lgender=new JLabel();
import java.awt.event.ActionListener; lgender.setBounds(650,230,150,25);
import java.sql.*; add(lgender);
} catch (Exception e) {
System.out.println(e);
}
setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==back)
{
setVisible(false):
new dashboard("");
}
}
}
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
JLabel lbno= new JLabel("Number");
import javax.swing.*; lbno.setBounds(30,130,150,25);
import java.sql.*; add(lbno);
try { JOptionPane.showMessageDialog(null,"custome
conn c= new conn(); r details Updated successfully");
String query="select * from customer where setVisible(false);
username ='"+username+"'"; new dashboard(username);
ResultSet rs=c.s.executeQuery(query); }
while(rs.next()) catch (Exception e2) {
{ System.out.println(e2);
txtunm.setText(rs.getString("username")); }
txtnm.setText(rs.getString("name")); }
jtf1.setText(rs.getString("number")); else{
tfgen.setText(rs.getString("gender")); setVisible(false);
jtcountry.setText(rs.getString("country")); new dashboard(username1);
jtaddress.setText(rs.getString("address")); }
tfmobile.setText(rs.getString("mobile"));
tfid.setText(rs.getString("id")); }
Check Packages Page:
} import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
} catch (Exception e) {
import javax.swing.*; back2.setForeground(Color.white);
import java.sql.*; back2.setFont(new Font("Tahoma",
public class checkpackages extends JFrame Font.BOLD, 20));
implements ActionListener { back2.addActionListener(this);
JButton back1,back2,back3; p2.add(back2);
checkpackages()
{ back3= new JButton("BACK");
setBounds(450,200,900,600); back3.setBounds(700,480,100,30);
back3.setBackground(Color.BLACK);
String[] package1={"Gold Package","6 back3.setForeground(Color.white);
days and 7 nights","AirPort Assistance","Half back3.setFont(new Font("Tahoma",
Day City Tour","Daily Buffet","Soft Drinks Font.BOLD, 20));
free","Full 3 day cruise","Book back3.addActionListener(this);
Package","Summer p3.add(back3);
Special","12000/-","package1.jpg"};
String[] package2={"Silver Package","5
days and 6 Nights","TOll free and Entrance Free setVisible(true);
Tickets","Meet nad Greet at airport","Welcome }
drinks on Arrival","night Safari","Winter public JPanel createPackage(String [] pack)
Special","Cruise with Dinner","Book {
now","24000/-","package2.jpg"}; JPanel pl= new JPanel();
String[] package3={"Bronze Package","6 pl.setLayout(null);
days and 5 Nights","Free Clubbing","Horse pl.setBackground(Color.WHITE);
RIding","Hard Drinks free","Daily JLabel l1= new JLabel(pack[0]);
Buffet","BBQ Dinner","Book Now","Winter l1.setBounds(50,25,300,40);
Special","32000/-","package3.jpg"}; l1.setForeground(Color.red);
l1.setFont(new
Font("Tahoma",Font.BOLD,30));
JTabbedPane tab= new JTabbedPane(); pl.add(l1);
if(e.getSource()==checkprice) }
{ String pack=ch.getSelectedItem(); else
int cost=0; {
if(pack.equals("Gold Package")) setVisible(false);
{ new dashboard(username1);
cost +=12000; }}
int }
persons=Integer.parseInt(tfpersons.getText()); View Package Page:
import java.awt.event.ActionListener;
import java.awt.*; import java.sql.*;
import java.awt.event.ActionEvent; import javax.swing.*;
public class viewpackage extends JFrame add(lid);
implements ActionListener {
JButton back; number =new JLabel("Number");
String username1; number.setBounds(30,230,150,25);
JLabel add(number);
usernm,package1,id,lid,persons,lpersons,lpackag lnumber=new JLabel();
e,lusernm,number,lnumber,mobileno,lmobileno, lnumber.setBounds(220,230,150,25);
price,lprice; add(lnumber);
}
} catch (Exception e) {
// TODO: handle exception
}
setVisible(true);
}
public static void main(String[] args) {
new viewpackage("");
}
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==back)
{
setVisible(false);
new dashboard(username1);
}
}
import javax.accessibility.AccessibleAction;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
add(chhotel);
public class bookhotel extends JFrame
implements ActionListener { number=new JLabel(" Total persons");
JLabel number.setBounds(40,170,150,20);
usernm,lusernm,id,lid,number,lprice,price,lnumb number.setFont(new Font("Tahoma",
er,mobileno,lmobileno,food,room,hotel,days; Font.BOLD, 16));
JButton back,checkprice,bookhotel; add(number);
Choice ch,chhotel,chfood,chroom; tfpersons= new JTextField();
JTextField tfpersons,ldays; tfpersons.setBounds(250,170,150,20);
String username1; add(tfpersons);
bookhotel(String username){
this.username1=username; days=new JLabel("No of Days");
setBounds(350,100,1100,700); days.setBounds(40,220,150,25);
setLayout(null); days.setFont(new Font("Tahoma", Font.BOLD,
16));
JLabel text= new JLabel("Book Hotel"); add(days);
text.setBounds(100,10,200,30); ldays=new JTextField();
text.setFont(new Font("Tahoma", Font.BOLD, ldays.setBounds(250,220,150,25);
20)); add(ldays);
add(text);
room=new JLabel("Select Room");
usernm=new JLabel("Username"); room.setFont(new Font("Tahoma", Font.BOLD,
usernm.setBounds(40,70,200,20); 16));
usernm.setFont(new Font("Tahoma", room.setBounds(40,270,100,20);
Font.BOLD, 20)); add(room);
add(usernm); chroom=new Choice();
lusernm=new JLabel(); chroom.add("AC");
lusernm.setBounds(250,70,200,20); chroom.add("NON-AC");
add(lusernm); chroom.setBounds(250,270,100,20);
add(chroom);
hotel=new JLabel("SelectHotel");
hotel.setFont(new Font("Tahoma", Font.BOLD, food=new JLabel("Select Room");
16)); food.setFont(new Font("Tahoma", Font.BOLD,
hotel.setBounds(40,120,100,20); 16));
add(hotel); food.setBounds(40,320,100,20);
chhotel=new Choice(); add(food);
try { chfood=new Choice();
conn c= new conn(); chfood.add("YES");
chfood.add("NO");
ResultSet rs=c.s.executeQuery("select * from chfood.setBounds(250,320,100,20);
bookhotel"); add(chfood);
while(rs.next())
{ id=new JLabel("ID");
id.setBounds(30,370,150,25);
chhotel.add(rs.getString("name")); id.setFont(new Font("Tahoma", Font.BOLD,
16));
} add(id);
} catch (Exception e) { lid=new JLabel();
// TODO: handle exception lid.setBounds(250,370,150,25);
} add(lid);
chhotel.setBounds(250,120,200,20);
number=new JLabel("Number"); checkprice.setForeground(Color.white);
number.setBounds(30,420,150,25); checkprice.setBounds(100,600,120,25);
number.setFont(new Font("Tahoma", checkprice.addActionListener(this);
Font.BOLD, 16)); add(checkprice);
add(number);
lnumber=new JLabel(); bookhotel =new JButton("Book Hotel");
lnumber.setBounds(250,420,150,25); bookhotel.setBackground(Color.BLACK);
add(lnumber); bookhotel.setForeground(Color.white);
bookhotel.setBounds(250,600,120,25);
bookhotel.addActionListener(this);
mobileno=new JLabel("Phone"); add(bookhotel);
mobileno.setBounds(30,470,150,25);
mobileno.setFont(new Font("Tahoma", back =new JButton("back");
Font.BOLD, 16)); back.setBackground(Color.BLACK);
add(mobileno); back.setForeground(Color.white);
lmobileno=new JLabel(); back.setBounds(400,600,120,25);
lmobileno.setBounds(250,470,150,25); back.addActionListener(this);
add(lmobileno); add(back);
setVisible(true);
price=new JLabel("Total Price");
price.setBounds(30,520,150,25); ImageIcon i1= new
price.setFont(new Font("Tahoma", Font.BOLD, ImageIcon(ClassLoader.getSystemResource("ico
16)); ns/book.jpg"));
add(price); Image i2=
lprice=new JLabel(); i1.getImage().getScaledInstance(500, 400,
lprice.setBounds(250,520,150,25); Image.SCALE_DEFAULT);
add(lprice); ImageIcon i3= new ImageIcon(i2);
JLabel img= new JLabel(i3);
try { img.setBounds(550,50,500,400);
add(img);
conn c= new conn();
String query="select * from customer where
username ='"+username1+"'"; }
ResultSet rs=c.s.executeQuery(query); public static void main(String[] args) {
while(rs.next()) new bookhotel("");
{ }
lusernm.setText(rs.getString("username")); @Override
lid.setText(rs.getString("id")); public void actionPerformed(ActionEvent e) {
lmobileno.setText(rs.getString("mobile"));
lnumber.setText(rs.getString("number")); if(e.getSource()==checkprice)
{
try{
conn c= new conn();
} ResultSet rs= c.s.executeQuery("select *
from bookhotel where
} catch (Exception e) { name='"+chhotel.getSelectedItem()+"' ");
// TODO: handle exception while(rs.next())
} {
int
checkprice =new JButton("Check Price"); cost=Integer.parseInt(rs.getString("costperperson
checkprice.setBackground(Color.BLACK); "));
int +"') ");
food=Integer.parseInt(rs.getString("foodincluded
")) ; JOptionPane.showMessageDialog(null, "hotel
int booked succesfully");
ac=Integer.parseInt(rs.getString("acroom")) ; setVisible(true);
String }
acselected=chroom.getSelectedItem(); else
String {
foodselected=chfood.getSelectedItem(); setVisible(false);
if(persons * days>0) new dashboard(username1);
{ }
int total=0; }
total+=acselected.equals("AC")?ac:0; }
total+=foodselected.equals("YES")?
food:0;
total+=cost;
total=total*persons*days;
lprice.setText("RS :"+total);
// add(lprice);
}
else
{
JOptionPane.showMessageDialog(null,
"Please eneter a valid Numb", foodselected,
days);
}
}
}catch(Exception e3)
{
System.out.println(e3);
}
}
else if(e.getSource()== bookhotel)
{
try {
conn c= new conn();
c.s.executeUpdate("insert into
bookhotel2 values('"+lusernm.getText() View Booked Hotels:
+"','"+chhotel.getSelectedItem()
+"','"+tfpersons.getText()+"','"+ldays.getText() import java.awt.*;
+"','"+chroom.getSelectedItem() import java.awt.event.ActionEvent;
+"','"+chfood.getSelectedItem() import java.awt.event.ActionListener;
+"','"+lid.getText()+"','"+lnumber.getText() import java.sql.*;
+"','"+lmobileno.getText()+"','"+lprice.getText() import javax.swing.*;
public class viewbookedhotel extends JFrame ltotaldays=new JLabel();
implements ActionListener { ltotaldays.setBounds(220,190,150,25);
JButton back; add(ltotaldays);
String username1;
JLabel
usernm,hotel,id,lid,persons,lpersons,lhotel,lusern id=new JLabel("ID");
m,number,lnumber,mobileno,lmobileno,price,lpr id.setBounds(30,230,150,25);
ice,food,lfood,cost,lcost,totaldays,ltotaldays,ac,la add(id);
c; lid=new JLabel();
lid.setBounds(220,230,150,25);
viewbookedhotel(String username) add(lid);
{
this.username1=username;
setBounds(450,200,1000,6000); number =new JLabel("Number");
number.setBounds(30,270,150,25);
getContentPane().setBackground(Color.white); add(number);
setLayout(null); lnumber=new JLabel();
lnumber.setBounds(220,270,150,25);
JLabel text= new JLabel("View Booked Hotel add(lnumber);
Details");
text.setFont(new mobileno=new JLabel("Mobile NO");
Font("Tahoma",Font.BOLD,20)); mobileno.setBounds(30,320,150,25);
text.setBounds(60,10,400,40); add(mobileno);
add(text); lmobileno=new JLabel();
lmobileno.setBounds(220,320,150,25);
add(lmobileno);
usernm=new JLabel("Username");
usernm.setBounds(30,70,150,25); // price=new JLabel("Price");
add(usernm); // price.setBounds(30,360,150,25);
lusernm=new JLabel(); // add(price);
lusernm.setBounds(220,70,150,25); // lprice=new JLabel();
add(lusernm); // lprice.setBounds(220,360,150,25);
// add(lprice);
hotel=new JLabel("Hotel Name");
hotel.setBounds(30,110,150,25); ac=new JLabel("AC/NON-AC");
add(hotel); ac.setBounds(30,360,150,25);
lhotel=new JLabel(); add(ac);
lhotel.setBounds(220,110,150,25); lac=new JLabel();
add(lhotel); lac.setBounds(220,360,150,25);
add(lac);
persons=new JLabel("Total Persons");
persons.setBounds(30,150,150,25); food=new JLabel("Food Included?");
add(persons); food.setBounds(30,400,150,25);
lpersons=new JLabel(); add(food);
lfood=new JLabel();
lpersons.setBounds(220,150,150,25); lfood.setBounds(220,400,150,25);
add(lpersons); add(lfood);
try {
conn c= new conn();
String query="select * from bookhotel2 where
username='"+username1+"'";
ResultSet rs=c.s.executeQuery(query);
while(rs.next())
{
lusernm.setText(rs.getString("username"));
lhotel.setText(rs.getString("name"));
lpersons.setText(rs.getString("persons"));
lid.setText(rs.getString("id"));
lnumber.setText(rs.getString("number"));
lmobileno.setText(rs.getString("phone"));
lcost.setText(rs.getString("price"));
lac.setText(rs.getString("ac"));
lfood.setText(rs.getString("food"));
ltotaldays.setText(rs.getString("days"));
}
} catch (Exception e) {
// TODO: handle exception Destinations Page:
}
setVisible(true); import java.awt.*;
} import javax.swing.*;
public static void main(String[] args) {
new viewbookedhotel(""); public class viewdestinations extends JFrame
} implements Runnable {
Thread t1;
try {
for(int i=0;i<=9;i++)
{
lable[i].setVisible(true);
Thread.sleep(2500);
lable[i].setVisible(false);
}
} catch (Exception e) {
// TODO: handle exception
}
}
viewdestinations()
{
for(int i=0;i<10;i++)
{
setBounds(500,200,800,600);
ImageIcon I1= new
ImageIcon(ClassLoader.getSystemResource("ico
ns/dest"+(i+1)+".jpg"));
Image i1=I1.getImage().getScaledInstance(800,
600,Image.SCALE_DEFAULT);
ImageIcon ii1=new ImageIcon(i1);
lable[i]=new JLabel(ii1);
lable[i].setBounds(0,0,800,600);
add(lable[i]);
}
t1=new Thread(this);
t1.start();
setVisible(true);
import java.awt.*;
} import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class payment extends JFrame
implements ActionListener{
JButton pay,back;
payment()
{
setBounds(500,200,800,600);
setLayout(null);
ImageIcon i1=new
ImageIcon(ClassLoader.getSystemResource("ico
ns/paytm.jpeg"));
Image i2=i1.getImage().getScaledInstance(800,
600, Image.SCALE_DEFAULT);
ImageIcon i3=new ImageIcon(i2);
JLabel image=new JLabel(i3);
image.setBounds(0,0,800,600);
add(image);
pay=new JButton("Pay");
pay.setBounds(420,0,80,40);
pay.addActionListener(this);
add(pay);
back=new JButton("Back");
back.setBounds(520,0,80,40);
back.addActionListener(this);
add(back);
setVisible(true);
@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==pay)
{
setVisible(false);
new paytm();
}
else
{
setVisible(false);
new dashboard("");
}
}
}