├── .idea ├── .gitignore ├── description.html ├── project-template.xml ├── encodings.xml ├── libraries │ └── sqlite_jdbc_3_34_0.xml ├── modules.xml ├── misc.xml └── uiDesigner.xml ├── src └── travel │ └── management │ └── system │ ├── tms.db │ ├── icons │ ├── book.jpg │ ├── home.jpg │ ├── delete.png │ ├── dest1.jpg │ ├── dest10.jpg │ ├── dest2.jpg │ ├── dest3.jpg │ ├── dest4.jpg │ ├── dest5.jpg │ ├── dest6.jpg │ ├── dest7.jpg │ ├── dest8.jpg │ ├── dest9.jpg │ ├── hotel1.jpg │ ├── hotel10.jpg │ ├── hotel2.jpg │ ├── hotel3.jpg │ ├── hotel4.jpg │ ├── hotel5.jpg │ ├── hotel6.jpg │ ├── hotel7.jpg │ ├── hotel8.jpg │ ├── hotel9.jpg │ ├── login.png │ ├── paytm.jpeg │ ├── signup.png │ ├── splash.jpg │ ├── update.png │ ├── viewall.jpg │ ├── package1.jpg │ ├── package2.jpg │ ├── package3.jpg │ ├── bookpackage.jpg │ ├── newcustomer.jpg │ ├── bookedDetails.jpg │ └── forgotpassword.jpg │ ├── Conn.java │ ├── Paytm.java │ ├── Payment.java │ ├── Splash.java │ ├── Loading.java │ ├── Destinations.java │ ├── About.java │ ├── CheckHotels.java │ ├── ViewPackage.java │ ├── Login.java │ ├── CheckPackage.java │ ├── SignUp.java │ ├── ViewCustomer.java │ ├── ViewBookedHotel.java │ ├── ForgetPassword.java │ ├── AddCustomer.java │ ├── UpdateCustomer.java │ ├── BookPackage.java │ ├── DeleteCustomer.java │ ├── BookHotel.java │ └── Dashboard.java ├── out └── production │ └── Travel Management System │ └── travel │ └── management │ └── system │ ├── About.class │ ├── Conn.class │ ├── Login.class │ ├── Paytm.class │ ├── Loading.class │ ├── Payment.class │ ├── SignUp.class │ ├── Splash.class │ ├── BookHotel.class │ ├── Dashboard.class │ ├── icons │ ├── book.jpg │ ├── delete.png │ ├── dest1.jpg │ ├── dest10.jpg │ ├── dest2.jpg │ ├── dest3.jpg │ ├── dest4.jpg │ ├── dest5.jpg │ ├── dest6.jpg │ ├── dest7.jpg │ ├── dest8.jpg │ ├── dest9.jpg │ ├── home.jpg │ ├── hotel1.jpg │ ├── hotel2.jpg │ ├── hotel3.jpg │ ├── hotel4.jpg │ ├── hotel5.jpg │ ├── hotel6.jpg │ ├── hotel7.jpg │ ├── hotel8.jpg │ ├── hotel9.jpg │ ├── login.png │ ├── paytm.jpeg │ ├── signup.png │ ├── splash.jpg │ ├── update.png │ ├── hotel10.jpg │ ├── package1.jpg │ ├── package2.jpg │ ├── package3.jpg │ ├── viewall.jpg │ ├── bookpackage.jpg │ ├── newcustomer.jpg │ ├── bookedDetails.jpg │ └── forgotpassword.jpg │ ├── AddCustomer.class │ ├── BookPackage.class │ ├── CheckHotels.class │ ├── CheckPackage.class │ ├── Destinations.class │ ├── SplashFrame.class │ ├── ViewCustomer.class │ ├── ViewPackage.class │ ├── DeleteCustomer.class │ ├── ForgetPassword.class │ ├── UpdateCustomer.class │ └── ViewBookedHotel.class ├── Travel Management System.iml └── README.md /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/description.html: -------------------------------------------------------------------------------- 1 | Simple Java application that includes a class with main() method -------------------------------------------------------------------------------- /.idea/project-template.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/travel/management/system/tms.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/tms.db -------------------------------------------------------------------------------- /src/travel/management/system/icons/book.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/book.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/home.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/delete.png -------------------------------------------------------------------------------- /src/travel/management/system/icons/dest1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/dest1.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/dest10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/dest10.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/dest2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/dest2.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/dest3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/dest3.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/dest4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/dest4.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/dest5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/dest5.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/dest6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/dest6.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/dest7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/dest7.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/dest8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/dest8.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/dest9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/dest9.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/hotel1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/hotel1.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/hotel10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/hotel10.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/hotel2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/hotel2.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/hotel3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/hotel3.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/hotel4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/hotel4.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/hotel5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/hotel5.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/hotel6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/hotel6.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/hotel7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/hotel7.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/hotel8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/hotel8.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/hotel9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/hotel9.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/login.png -------------------------------------------------------------------------------- /src/travel/management/system/icons/paytm.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/paytm.jpeg -------------------------------------------------------------------------------- /src/travel/management/system/icons/signup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/signup.png -------------------------------------------------------------------------------- /src/travel/management/system/icons/splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/splash.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/update.png -------------------------------------------------------------------------------- /src/travel/management/system/icons/viewall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/viewall.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/package1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/package1.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/package2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/package2.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/package3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/package3.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/bookpackage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/bookpackage.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/newcustomer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/newcustomer.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/bookedDetails.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/bookedDetails.jpg -------------------------------------------------------------------------------- /src/travel/management/system/icons/forgotpassword.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/src/travel/management/system/icons/forgotpassword.jpg -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/About.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/About.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/Conn.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/Conn.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/Login.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/Login.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/Paytm.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/Paytm.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/Loading.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/Loading.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/Payment.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/Payment.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/SignUp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/SignUp.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/Splash.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/Splash.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/BookHotel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/BookHotel.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/Dashboard.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/Dashboard.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/book.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/book.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/delete.png -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/dest1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/dest1.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/dest10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/dest10.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/dest2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/dest2.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/dest3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/dest3.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/dest4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/dest4.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/dest5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/dest5.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/dest6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/dest6.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/dest7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/dest7.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/dest8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/dest8.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/dest9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/dest9.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/home.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/hotel1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/hotel1.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/hotel2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/hotel2.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/hotel3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/hotel3.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/hotel4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/hotel4.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/hotel5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/hotel5.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/hotel6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/hotel6.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/hotel7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/hotel7.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/hotel8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/hotel8.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/hotel9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/hotel9.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/login.png -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/paytm.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/paytm.jpeg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/signup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/signup.png -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/splash.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/update.png -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/AddCustomer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/AddCustomer.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/BookPackage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/BookPackage.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/CheckHotels.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/CheckHotels.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/CheckPackage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/CheckPackage.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/Destinations.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/Destinations.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/SplashFrame.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/SplashFrame.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/ViewCustomer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/ViewCustomer.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/ViewPackage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/ViewPackage.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/hotel10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/hotel10.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/package1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/package1.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/package2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/package2.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/package3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/package3.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/viewall.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/viewall.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/DeleteCustomer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/DeleteCustomer.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/ForgetPassword.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/ForgetPassword.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/UpdateCustomer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/UpdateCustomer.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/ViewBookedHotel.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/ViewBookedHotel.class -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/bookpackage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/bookpackage.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/newcustomer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/newcustomer.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/bookedDetails.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/bookedDetails.jpg -------------------------------------------------------------------------------- /out/production/Travel Management System/travel/management/system/icons/forgotpassword.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RajaGupta2512/travel-and-tourism-management-system/HEAD/out/production/Travel Management System/travel/management/system/icons/forgotpassword.jpg -------------------------------------------------------------------------------- /.idea/libraries/sqlite_jdbc_3_34_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Travel Management System.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/travel/management/system/Conn.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import java.sql.Connection; 4 | import java.sql.DriverManager; 5 | import java.sql.SQLException; 6 | import java.sql.Statement; 7 | 8 | public class Conn { 9 | 10 | Connection c; 11 | Statement s; 12 | 13 | public Conn () { 14 | try { 15 | c = DriverManager.getConnection("jdbc:sqlite:C:\\Users\\Raja Gupta\\IdeaProjects\\" + 16 | "Travel Management System\\src\\travel\\management\\system\\tms.db"); 17 | s = c.createStatement(); 18 | 19 | } catch (SQLException e) { 20 | System.out.println("Something Went Wrong: " + e.getMessage()); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | The objective of the Travel and Tourism Management System project is to develop a system that automates the processes and activities of a travel and tourism agency. The purpose is to design a system using which one can perform all operations related to traveling and sight-seeing. The system allows one to easily access the relevant information and make necessary travel arrangements. Users can decide about places they want to visit and make bookings online for travel and accommodation. 2 | 3 | ![Travel and Tourism management System1](https://user-images.githubusercontent.com/81694983/120067410-17fe4080-c099-11eb-8f50-271472c619b2.png) 4 | ![Travel and Tourism management System2](https://user-images.githubusercontent.com/81694983/120067446-40863a80-c099-11eb-9b52-8d7444bc0cc4.png) 5 | ![Travel and Tourism management System3](https://user-images.githubusercontent.com/81694983/120067474-6e6b7f00-c099-11eb-9f19-699fce65663a.png) 6 | # travel-and-tourism-management-system 7 | -------------------------------------------------------------------------------- /src/travel/management/system/Paytm.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.event.ActionEvent; 5 | import java.awt.event.ActionListener; 6 | 7 | public class Paytm extends JFrame implements ActionListener { 8 | 9 | JButton b1; 10 | 11 | Paytm () { 12 | 13 | this.setBounds(350, 150, 800, 600); 14 | 15 | JEditorPane j = new JEditorPane(); 16 | j.setEditable(false); 17 | try { 18 | j.setPage("https://paytm.com"); 19 | 20 | } catch (Exception e) { 21 | j.setContentType("text/html"); 22 | j.setText("Could not Load, ERROR 404"); 23 | } 24 | 25 | JScrollPane js = new JScrollPane(j); 26 | this.getContentPane().add(js); 27 | 28 | b1 = new JButton("Back"); 29 | b1.setBounds(610, 20, 80, 40); 30 | b1.addActionListener(this); 31 | j.add(b1); 32 | } 33 | 34 | public void actionPerformed (ActionEvent ae) { 35 | this.setVisible(false); 36 | new Payment().setVisible(true); 37 | } 38 | 39 | public static void main(String[] args) { 40 | new Paytm().setVisible(true); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/travel/management/system/Payment.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | 8 | public class Payment extends JFrame implements ActionListener { 9 | 10 | JButton b1, b2; 11 | 12 | Payment () { 13 | 14 | this.setBounds(350, 150, 800, 600); 15 | this.getContentPane().setBackground(Color.WHITE); 16 | this.setLayout(null); 17 | 18 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/paytm.jpeg")); 19 | Image i2 = i1.getImage().getScaledInstance(800, 600, Image.SCALE_DEFAULT); 20 | ImageIcon i3 = new ImageIcon(i2); 21 | JLabel l = new JLabel(i3); 22 | l.setBounds(0, 0, 800, 600); 23 | this.add(l); 24 | 25 | b1 = new JButton("Pay"); 26 | b1.setBounds(300, 0, 80, 40); 27 | b1.addActionListener(this); 28 | l.add(b1); 29 | 30 | b2 = new JButton("Back"); 31 | b2.setBounds(450, 0, 80, 40); 32 | b2.addActionListener(this); 33 | l.add(b2); 34 | } 35 | 36 | public void actionPerformed (ActionEvent ae) { 37 | if (ae.getSource() == b1) { 38 | this.setVisible(false); 39 | new Paytm().setVisible(true); 40 | } else if (ae.getSource() == b2){ 41 | this.setVisible(false); 42 | } 43 | } 44 | 45 | public static void main(String[] args) { 46 | new Payment().setVisible(true); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/travel/management/system/Splash.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | 6 | public class Splash { 7 | 8 | public static void main (String[] args) { 9 | 10 | SplashFrame frame = new SplashFrame(); 11 | 12 | frame.setVisible(true); 13 | int x = 1; 14 | for (int i = 1; i <= 600; i+=6, x+=7) { 15 | 16 | frame.setLocation(770 - (x + i) / 2, 400 - (i / 2)); 17 | frame.setSize(x + i, i); 18 | 19 | try { 20 | Thread.sleep(15); 21 | 22 | } catch (Exception e) { 23 | e.getMessage(); 24 | } 25 | } 26 | 27 | frame.setVisible(true); 28 | } 29 | } 30 | 31 | class SplashFrame extends JFrame implements Runnable { 32 | 33 | Thread t1; 34 | 35 | SplashFrame () { 36 | 37 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/splash.jpg")); 38 | Image i2 = i1.getImage().getScaledInstance(1510, 600, Image.SCALE_DEFAULT); 39 | ImageIcon i3 = new ImageIcon(i2); 40 | JLabel l1 = new JLabel(i3); 41 | this.add(l1); 42 | 43 | this.setUndecorated(true); 44 | 45 | t1 = new Thread(this); 46 | t1.start(); 47 | } 48 | 49 | public void run () { 50 | 51 | try { 52 | Thread.sleep(7000); 53 | this.setVisible(false); 54 | 55 | new Login().setVisible(true); 56 | 57 | } catch (Exception e) { 58 | e.getMessage(); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/travel/management/system/Loading.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | 6 | public class Loading extends JFrame implements Runnable { 7 | 8 | JProgressBar pb; 9 | Thread t; 10 | String username; 11 | 12 | public void run () { 13 | try { 14 | for (int i = 1; i <= 101; i++) { 15 | int max = pb.getMaximum(); 16 | int curr = pb.getValue(); 17 | if (curr < max) { 18 | pb.setValue(pb.getValue() + 1); 19 | } else { 20 | i = 101; 21 | this.setVisible(false); 22 | new Dashboard(username).setVisible(true); 23 | } 24 | Thread.sleep(50); 25 | } 26 | 27 | } catch (Exception e) { 28 | e.getMessage(); 29 | } 30 | } 31 | 32 | Loading (String user) { 33 | 34 | this.username = user; 35 | t = new Thread(this); 36 | 37 | this.setBounds(450, 200, 650, 400); 38 | this.getContentPane().setBackground(Color.WHITE); 39 | this.setUndecorated(true); 40 | this.setLayout(null); 41 | 42 | JLabel l1 = new JLabel("Travel and Tourism Application"); 43 | l1.setBounds(90, 20, 600, 40); 44 | l1.setFont(new Font("Raleway", Font.BOLD, 30)); 45 | l1.setForeground(Color.BLUE); 46 | this.add(l1); 47 | 48 | pb = new JProgressBar(); 49 | pb.setBounds(170, 100, 300, 25); 50 | pb.setForeground(Color.BLACK); 51 | pb.setStringPainted(true); 52 | this.add(pb); 53 | 54 | JLabel l2 = new JLabel("Please Wait..."); 55 | l2.setBounds(255, 130, 120, 25); 56 | l2.setFont(new Font("Tahoma", Font.BOLD, 16)); 57 | l2.setForeground(Color.RED); 58 | this.add(l2); 59 | 60 | JLabel l3 = new JLabel("Welcome " + username); 61 | l3.setBounds(20, 350, 400, 25); 62 | l3.setFont(new Font("Tahoma", Font.BOLD, 16)); 63 | l3.setForeground(Color.RED); 64 | this.add(l3); 65 | 66 | t.start(); 67 | } 68 | 69 | public static void main(String[] args) { 70 | new Loading("Anonymous").setVisible(true); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/travel/management/system/Destinations.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | 6 | public class Destinations extends JFrame implements Runnable { 7 | 8 | Thread t1; 9 | JLabel l1, l2, l3, l4, l5, l6, l7, l8, l9, l10; 10 | JLabel[] labels = new JLabel[]{l1, l2, l3, l4, l5, l6, l7, l8, l9, l10}; 11 | 12 | public void run () { 13 | 14 | for (int i = 0; i <= 9; i++) { 15 | try { 16 | this.labels[i].setVisible(true); 17 | Thread.sleep(2800); 18 | this.labels[i].setVisible(false); 19 | } catch (Exception e) { 20 | e.printStackTrace(); 21 | } 22 | } 23 | this.setVisible(false); 24 | } 25 | 26 | Destinations () { 27 | 28 | super("Destinations"); 29 | 30 | this.setBounds(350, 150, 900, 650); 31 | this.setLayout(null); 32 | 33 | ImageIcon i1 = null, i2 = null, i3 = null, i4 = null, i5 = null, i6 = null, i7 = null, i8 = null, i9 = null, i10 = null; 34 | ImageIcon[] images = new ImageIcon[]{i1, i2, i3, i4, i5, i6, i7, i8, i9, i10}; 35 | 36 | Image j1 = null, j2 = null, j3 = null, j4 = null, j5 = null, j6 = null, j7 = null, j8 = null, j9 = null, j10 = null; 37 | Image[] jImages = new Image[]{j1, j2, j3, j4, j5, j6, j7, j8, j9, j10}; 38 | 39 | ImageIcon i11 = null, i12 = null, i13 = null, i14 = null, i15 = null, i16 = null, i17 = null, i18 = null, i19 = null, i20 = null; 40 | ImageIcon[] iimages = new ImageIcon[]{i11, i12, i13, i14, i15, i16, i17, i18, i19, i20}; 41 | 42 | for (int i = 0; i <= 9; i++) { 43 | images[i] = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/dest"+(i+1)+".jpg")); 44 | jImages[i] = images[i].getImage().getScaledInstance(900, 650, Image.SCALE_DEFAULT); 45 | iimages[i] = new ImageIcon(jImages[i]); 46 | this.labels[i] = new JLabel(iimages[i]); 47 | this.labels[i].setBounds(0, 0, 900, 650); 48 | this.add(this.labels[i]); 49 | } 50 | 51 | t1 = new Thread(this); 52 | t1.start(); 53 | } 54 | 55 | public static void main(String[] args) { 56 | new Destinations().setVisible(true); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/travel/management/system/About.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import java.awt.*; 4 | import java.awt.event.*; 5 | import javax.swing.*; 6 | import java.awt.Font; 7 | import javax.swing.JFrame; 8 | 9 | public class About extends JFrame implements ActionListener { 10 | 11 | String s; 12 | 13 | public About() { 14 | 15 | this.setBounds(530, 180, 500, 550); 16 | this.getContentPane().setBackground(Color.WHITE); 17 | this.setLayout(null); 18 | 19 | s = " About Projects \n " 20 | + "\nThe objective of the Travel and Tourism Management System" 21 | + "project is to develop a system that automates the processes " 22 | + "and activities of a travel and the purpose is to design a " 23 | + "system using which one can perform all operations related to " 24 | + "traveling.\n\n" 25 | + "This application will help in accessing the information related " 26 | + "to the travel to the particular destination with great ease. " 27 | + "The users can track the information related to their tours with " 28 | + "great ease through this application. The travel agency information " 29 | + "can also be obtained through this application.\n\n" 30 | + "Advantages of Project:" 31 | + "\nGives accurate information" 32 | + "\nSimplifies the manual work" 33 | + "\nIt minimizes the documentation related work" 34 | + "\nProvides up to date information" 35 | + "\nFriendly Environment by providing warning messages." 36 | + "\ntravelers details can be provided" 37 | + "\nbooking confirmation notification" 38 | ; 39 | 40 | TextArea t1 = new TextArea(s, 10, 40, Scrollbar.VERTICAL); 41 | t1.setEditable(false); 42 | t1.setFont(new Font("RALEWAY", Font.BOLD, 16)); 43 | t1.setBounds(20, 100, 450, 300); 44 | this.add(t1); 45 | 46 | JLabel l1 = new JLabel("Travel and Tourism Management System"); 47 | l1.setFont(new Font("Tahoma", Font.BOLD, 20)); 48 | l1.setForeground(Color.RED); 49 | l1.setBounds(50, 10, 500, 80); 50 | this.add(l1); 51 | 52 | JButton b = new JButton("Exit"); 53 | b.setBounds(180, 430, 120, 20); 54 | b.addActionListener(this); 55 | this.add(b); 56 | } 57 | 58 | public void actionPerformed(ActionEvent e) { 59 | dispose(); 60 | } 61 | 62 | public static void main(String args[]) { 63 | new About().setVisible(true); 64 | } 65 | 66 | } -------------------------------------------------------------------------------- /src/travel/management/system/CheckHotels.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | 6 | public class CheckHotels extends JFrame implements Runnable { 7 | 8 | Thread t1; 9 | JLabel l1, l2, l3, l4, l5, l6, l7, l8, l9, l10; 10 | JLabel[] labels = new JLabel[]{l1, l2, l3, l4, l5, l6, l7, l8, l9, l10}; 11 | JLabel caption; 12 | 13 | public void run () { 14 | 15 | String[] text = new String[]{"JW Marriott Hotel", "Mandarin Oriental Hotel", "Four Seasons Hotel", "Radisson Hotel", 16 | "Classio Hotel", "The Bay Club Hotel", "Breeze Blows Hotel", "Quick Stop Hotel", "Happy Morning Motel","Mos View Hotel"}; 17 | 18 | for (int i = 0; i <= 9; i++) { 19 | try { 20 | this.labels[i].setVisible(true); 21 | caption.setText(text[i]); 22 | this.labels[i].add(caption); 23 | Thread.sleep(2800); 24 | this.labels[i].setVisible(false); 25 | } catch (Exception e) { 26 | e.printStackTrace(); 27 | } 28 | } 29 | this.setVisible(false); 30 | } 31 | 32 | CheckHotels () { 33 | 34 | super("Hotels"); 35 | 36 | this.setBounds(350, 150, 900, 650); 37 | this.setLayout(null); 38 | 39 | ImageIcon i1 = null, i2 = null, i3 = null, i4 = null, i5 = null, i6 = null, i7 = null, i8 = null, i9 = null, i10 = null; 40 | ImageIcon[] images = new ImageIcon[]{i1, i2, i3, i4, i5, i6, i7, i8, i9, i10}; 41 | 42 | Image j1 = null, j2 = null, j3 = null, j4 = null, j5 = null, j6 = null, j7 = null, j8 = null, j9 = null, j10 = null; 43 | Image[] jImages = new Image[]{j1, j2, j3, j4, j5, j6, j7, j8, j9, j10}; 44 | 45 | ImageIcon i11 = null, i12 = null, i13 = null, i14 = null, i15 = null, i16 = null, i17 = null, i18 = null, i19 = null, i20 = null; 46 | ImageIcon[] iimages = new ImageIcon[]{i11, i12, i13, i14, i15, i16, i17, i18, i19, i20}; 47 | 48 | caption = new JLabel(); 49 | caption.setBounds(50, 550, 1000,70); 50 | caption.setForeground(Color.WHITE); 51 | caption.setFont(new Font("Tahoma", Font.PLAIN, 40)); 52 | this.add(caption); 53 | 54 | for (int i = 0; i <= 9; i++) { 55 | images[i] = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/hotel"+(i+1)+".jpg")); 56 | jImages[i] = images[i].getImage().getScaledInstance(900, 650, Image.SCALE_DEFAULT); 57 | iimages[i] = new ImageIcon(jImages[i]); 58 | this.labels[i] = new JLabel(iimages[i]); 59 | this.labels[i].setBounds(0, 0, 900, 650); 60 | this.add(this.labels[i]); 61 | } 62 | 63 | t1 = new Thread(this); 64 | t1.start(); 65 | } 66 | 67 | public static void main(String[] args) { 68 | new CheckHotels().setVisible(true); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/travel/management/system/ViewPackage.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | 10 | public class ViewPackage extends JFrame implements ActionListener { 11 | 12 | JButton b; 13 | 14 | ViewPackage (String username) { 15 | 16 | this.setBounds(350, 150, 900, 450); 17 | this.getContentPane().setBackground(Color.WHITE); 18 | this.setLayout(null); 19 | 20 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/booKedDetails.jpg")); 21 | Image i2 = i1.getImage().getScaledInstance(500, 400, Image.SCALE_DEFAULT); 22 | ImageIcon i3 = new ImageIcon(i2); 23 | JLabel l8 = new JLabel(i3); 24 | l8.setBounds(450, 20, 500, 400); 25 | this.add(l8); 26 | 27 | JLabel heading = new JLabel("VIEW PACKAGE DETAILS"); 28 | heading.setBounds(60, 0, 300, 30); 29 | heading.setFont(new Font("Tahoma", Font.BOLD, 20)); 30 | this.add(heading); 31 | 32 | JLabel l1 = new JLabel("Username: "); 33 | l1.setBounds(30, 50, 100, 30); 34 | this.add(l1); 35 | 36 | JLabel l11 = new JLabel(); 37 | l11.setBounds(250, 50, 200, 30); 38 | this.add(l11); 39 | 40 | JLabel l2 = new JLabel("Package: "); 41 | l2.setBounds(30, 90, 100, 30); 42 | this.add(l2); 43 | 44 | JLabel l12 = new JLabel(); 45 | l12.setBounds(250, 90, 200, 30); 46 | this.add(l12); 47 | 48 | JLabel l3 = new JLabel("Total Persons: "); 49 | l3.setBounds(30, 130, 100, 30); 50 | this.add(l3); 51 | 52 | JLabel l13 = new JLabel(); 53 | l13.setBounds(250, 130, 200, 30); 54 | this.add(l13); 55 | 56 | JLabel l4 = new JLabel("ID: "); 57 | l4.setBounds(30, 170, 100, 30); 58 | this.add(l4); 59 | 60 | JLabel l14 = new JLabel(); 61 | l14.setBounds(250, 170, 200, 30); 62 | this.add(l14); 63 | 64 | JLabel l5 = new JLabel("Number: "); 65 | l5.setBounds(30, 210, 100, 30); 66 | this.add(l5); 67 | 68 | JLabel l15 = new JLabel(); 69 | l15.setBounds(250, 210, 200, 30); 70 | this.add(l15); 71 | 72 | JLabel l6 = new JLabel("Phone: "); 73 | l6.setBounds(30, 250, 100, 30); 74 | this.add(l6); 75 | 76 | JLabel l16 = new JLabel(); 77 | l16.setBounds(250, 250, 200, 30); 78 | this.add(l16); 79 | 80 | JLabel l7 = new JLabel("Price: "); 81 | l7.setBounds(30, 290, 100, 30); 82 | this.add(l7); 83 | 84 | JLabel l17 = new JLabel(); 85 | l17.setBounds(250, 290, 200, 30); 86 | this.add(l17); 87 | 88 | try { 89 | 90 | Conn c = new Conn(); 91 | ResultSet rs = c.s.executeQuery("SELECT * FROM bookedPackage WHERE username = '"+username+"'"); 92 | 93 | while (rs.next()) { 94 | l11.setText(rs.getString(1)); 95 | l12.setText(rs.getString(2)); 96 | l13.setText(rs.getString(3)); 97 | l14.setText(rs.getString(4)); 98 | l15.setText(rs.getString(5)); 99 | l16.setText(rs.getString(6)); 100 | l17.setText(rs.getString(7)); 101 | } 102 | } catch (SQLException e) { 103 | e.getMessage(); 104 | } 105 | 106 | b = new JButton("Back"); 107 | b.setBackground(Color.BLACK); 108 | b.setForeground(Color.WHITE); 109 | b.setBounds(130, 360, 100, 25); 110 | b.addActionListener(this); 111 | this.add(b); 112 | } 113 | 114 | public void actionPerformed (ActionEvent ae) { 115 | this.setVisible(false); 116 | } 117 | 118 | public static void main(String[] args) { 119 | new ViewPackage("Anonymous").setVisible(true); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /src/travel/management/system/Login.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import javax.swing.border.LineBorder; 5 | import java.awt.*; 6 | import java.awt.event.ActionEvent; 7 | import java.awt.event.ActionListener; 8 | import java.sql.ResultSet; 9 | 10 | public class Login extends JFrame implements ActionListener { 11 | 12 | JButton b1, b2, b3; 13 | JTextField t1; 14 | JPasswordField t2; 15 | 16 | Login () { 17 | 18 | super("Login"); 19 | 20 | this.setLayout(null); 21 | this.setBounds(350, 130, 900, 400); 22 | 23 | JPanel p1 = new JPanel(); 24 | p1.setLayout(null); 25 | p1.setBounds(0, 0, 400, 400); 26 | p1.setBackground(new Color(131, 193, 233)); 27 | this.add(p1); 28 | 29 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/login.png")); 30 | Image i2 = i1.getImage().getScaledInstance(200, 200,Image.SCALE_DEFAULT); 31 | ImageIcon i3 = new ImageIcon(i2); 32 | JLabel l1 = new JLabel(i3); 33 | l1.setBounds(90, 80, 200, 200); 34 | p1.add(l1); 35 | 36 | JPanel p2 = new JPanel(); 37 | p2.setLayout(null); 38 | p2.setBounds(400, 30, 450, 300); 39 | this.add(p2); 40 | 41 | JLabel l2 = new JLabel("Username"); 42 | l2.setBounds(60, 20, 100, 25); 43 | l2.setFont(new Font("SAN_SERIF", Font.PLAIN, 20)); 44 | p2.add(l2); 45 | 46 | t1 = new JTextField(); 47 | t1.setBounds(60, 50, 300, 30); 48 | t1.setBorder(BorderFactory.createEmptyBorder()); 49 | p2.add(t1); 50 | 51 | JLabel l3 = new JLabel("Password"); 52 | l3.setBounds(60, 110, 100, 25); 53 | l3.setFont(new Font("SAN_SERIF", Font.PLAIN, 20)); 54 | p2.add(l3); 55 | 56 | t2 = new JPasswordField(); 57 | t2.setBounds(60, 150, 300, 30); 58 | t2.setBorder(BorderFactory.createEmptyBorder()); 59 | p2.add(t2); 60 | 61 | b1 = new JButton("Login"); 62 | b1.setBounds(60, 200, 130, 30); 63 | b1.setBackground(new Color(133, 193, 233)); 64 | b1.setBorder(BorderFactory.createEmptyBorder()); 65 | b1.addActionListener(this); 66 | p2.add(b1); 67 | 68 | b2 = new JButton("Sign Up"); 69 | b2.setBounds(230, 200, 130, 30); 70 | b2.setBackground(Color.WHITE); 71 | b2.setForeground(new Color(133, 193, 233)); 72 | b2.setBorder(new LineBorder(new Color(133, 193, 233))); 73 | b2.addActionListener(this); 74 | p2.add(b2); 75 | 76 | b3 = new JButton("Forget Password"); 77 | b3.setBounds(130, 250, 160, 30); 78 | b3.setBackground(Color.WHITE); 79 | b3.setForeground(new Color(133, 193, 233)); 80 | b3.setBorder(new LineBorder(new Color(133, 193, 233))); 81 | b3.addActionListener(this); 82 | p2.add(b3); 83 | 84 | JLabel l4 = new JLabel("Trouble Logging..."); 85 | l4.setBounds(300, 250, 120, 20); 86 | l4.setForeground(Color.RED); 87 | p2.add(l4); 88 | 89 | this.setVisible(true); 90 | } 91 | 92 | public void actionPerformed (ActionEvent ae) { 93 | 94 | if (ae.getSource() == b1) { 95 | try { 96 | String username = t1.getText(); 97 | String password = t2.getText(); 98 | 99 | String sql = "SELECT * FROM account WHERE username = '"+username+"' AND password = '"+password+"'"; 100 | Conn c = new Conn(); 101 | ResultSet rs = c.s.executeQuery(sql); 102 | if (rs.next()) { 103 | this.setVisible(false); 104 | new Loading(username).setVisible(true); 105 | } else { 106 | JOptionPane.showMessageDialog(null, "Invalid Login"); 107 | } 108 | 109 | } catch (Exception e) { 110 | e.getMessage(); 111 | } 112 | } else if (ae.getSource() == b2) { 113 | this.setVisible(false); 114 | new SignUp().setVisible(true); 115 | } else if (ae.getSource() == b3) { 116 | this.setVisible(false); 117 | new ForgetPassword().setVisible(true); 118 | } 119 | } 120 | 121 | public static void main(String[] args) { 122 | new Login(); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /src/travel/management/system/CheckPackage.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | 6 | public class CheckPackage extends JFrame { 7 | 8 | CheckPackage () { 9 | 10 | this.setBounds(350, 150, 900, 600); 11 | 12 | String[] package1 = new String[]{"GOLD PACKAGE", "6 Days and 7 Nights", "Airport Assistance", "Half Day City Tour", 13 | "Daily Buffet", "Welcome Drinks at Arrival", "Full Day 3 Island Cruise", "English Speaking Guide", 14 | "BOOK NOW!", "SUMMER SPECIAL", "Rs. 12000/-", "package1.jpg"}; 15 | 16 | String[] package2 = new String[]{"SILVER PACKAGE", "5 Days and 6 Nights", "Toll FREE and Entrance FREE Tickets", 17 | "Meet and Greet at Airport", "Welcome Drinks at Arrival", "Night Safari", "Full Day 3 Island Cruise", 18 | "Cruise with Diner", "BOOK NOW!", "WINTER SPECIAL", "Rs. 25000/-", "package2.jpg"}; 19 | 20 | String[] package3 = new String[]{"BRONZE PACKAGE","6 Days and 5 Nights", "Return Airfare", 21 | "Free Clubbing, Horse Riding & Other Games", "Welcome Drinks on Arrival", "Daily Buffet", "Stay in 5 Star Hotel", 22 | "BBQ Dinner", "BOOK NOW!", "Winter Special", "Rs. 32000/-", "package3.jpg"}; 23 | 24 | JTabbedPane pane = new JTabbedPane(); 25 | 26 | JPanel p1 = createPackage(package1); 27 | pane.addTab("Package 1", null, p1); 28 | 29 | JPanel p2 = createPackage(package2); 30 | pane.addTab("Package 2", null, p2); 31 | 32 | JPanel p3 = createPackage(package3); 33 | pane.addTab("Package 3", null, p3); 34 | 35 | this.add(pane, BorderLayout.CENTER); 36 | } 37 | 38 | public JPanel createPackage (String[] pack) { 39 | JPanel p1 = new JPanel(); 40 | p1.setLayout(null); 41 | p1.setBackground(Color.WHITE); 42 | 43 | JLabel l1 = new JLabel(pack[0]); 44 | l1.setBounds(50, 5, 300, 30); 45 | l1.setFont(new Font("Tahoma", Font.BOLD, 30)); 46 | p1.add(l1); 47 | 48 | JLabel l2 = new JLabel(pack[1]); 49 | l2.setBounds(30, 60, 300, 30); 50 | l2.setFont(new Font("Tahoma", Font.PLAIN, 20)); 51 | l2.setForeground(Color.RED); 52 | p1.add(l2); 53 | 54 | JLabel l3 = new JLabel(pack[2]); 55 | l3.setBounds(30, 110, 300, 30); 56 | l3.setFont(new Font("Tahoma", Font.PLAIN, 20)); 57 | l3.setForeground(Color.BLUE); 58 | p1.add(l3); 59 | 60 | JLabel l4 = new JLabel(pack[3]); 61 | l4.setBounds(30, 160, 300, 30); 62 | l4.setFont(new Font("Tahoma", Font.PLAIN, 20)); 63 | l4.setForeground(Color.RED); 64 | p1.add(l4); 65 | 66 | JLabel l5 = new JLabel(pack[4]); 67 | l5.setBounds(30, 210, 300, 30); 68 | l5.setFont(new Font("Tahoma", Font.PLAIN, 20)); 69 | l5.setForeground(Color.BLUE); 70 | p1.add(l5); 71 | 72 | JLabel l6 = new JLabel(pack[5]); 73 | l6.setBounds(30, 260, 300, 30); 74 | l6.setFont(new Font("Tahoma", Font.PLAIN, 20)); 75 | l6.setForeground(Color.RED); 76 | p1.add(l6); 77 | 78 | JLabel l7 = new JLabel(pack[6]); 79 | l7.setBounds(30, 310, 300, 30); 80 | l7.setFont(new Font("Tahoma", Font.PLAIN, 20)); 81 | l7.setForeground(Color.BLUE); 82 | p1.add(l7); 83 | 84 | JLabel l8 = new JLabel(pack[7]); 85 | l8.setBounds(30, 360, 300, 30); 86 | l8.setFont(new Font("Tahoma", Font.PLAIN, 20)); 87 | l8.setForeground(Color.RED); 88 | p1.add(l8); 89 | 90 | JLabel l9 = new JLabel(pack[8]); 91 | l9.setBounds(30, 430, 300, 30); 92 | l9.setFont(new Font("Tahoma", Font.PLAIN, 30)); 93 | l9.setForeground(Color.BLUE); 94 | p1.add(l9); 95 | 96 | JLabel l10 = new JLabel(pack[9]); 97 | l10.setBounds(300, 470, 300, 30); 98 | l10.setFont(new Font("Tahoma", Font.BOLD, 30)); 99 | l10.setForeground(Color.RED); 100 | p1.add(l10); 101 | 102 | JLabel l11 = new JLabel(pack[10]); 103 | l11.setBounds(700, 470, 300, 30); 104 | l11.setFont(new Font("Tahoma", Font.BOLD, 20)); 105 | l11.setForeground(Color.RED); 106 | p1.add(l11); 107 | 108 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/"+pack[11]+"")); 109 | Image i2 = i1.getImage().getScaledInstance(500, 300, Image.SCALE_DEFAULT); 110 | ImageIcon i3 = new ImageIcon(i2); 111 | JLabel l12 = new JLabel(i3); 112 | l12.setBounds(350, 30, 500, 300); 113 | p1.add(l12); 114 | 115 | return p1; 116 | } 117 | 118 | public static void main(String[] args) { 119 | new CheckPackage().setVisible(true); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /src/travel/management/system/SignUp.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | import java.sql.SQLException; 8 | 9 | public class SignUp extends JFrame implements ActionListener { 10 | 11 | JButton b1, b2; 12 | JTextField t1, t2, t4; 13 | JPasswordField t3; 14 | Choice c1; 15 | 16 | SignUp () { 17 | 18 | super("Sign Up"); 19 | 20 | this.setBounds(350, 100, 900, 360); 21 | this.getContentPane().setBackground(Color.WHITE); 22 | this.setLayout(null); 23 | 24 | JPanel p1 = new JPanel(); 25 | p1.setBackground(new Color(133, 193, 233)); 26 | p1.setBounds(0, 0, 500, 400); 27 | p1.setLayout(null); 28 | 29 | this.add(p1); 30 | 31 | JLabel l1 = new JLabel("Username"); 32 | l1.setBounds(50, 20, 100, 25); 33 | l1.setFont(new Font("Tahoma", Font.BOLD, 14)); 34 | p1.add(l1); 35 | 36 | t1 = new JTextField(); 37 | t1.setBounds(190, 20, 200, 25); 38 | t1.setBorder(BorderFactory.createEmptyBorder()); 39 | p1.add(t1); 40 | 41 | JLabel l2 = new JLabel("Name"); 42 | l2.setBounds(50, 60, 100, 25); 43 | l2.setFont(new Font("Tahoma", Font.BOLD, 14)); 44 | p1.add(l2); 45 | 46 | t2 = new JTextField(); 47 | t2.setBounds(190, 60, 200, 25); 48 | t2.setBorder(BorderFactory.createEmptyBorder()); 49 | p1.add(t2); 50 | 51 | JLabel l3 = new JLabel("Password"); 52 | l3.setBounds(50, 100, 100, 25); 53 | l3.setFont(new Font("Tahoma", Font.BOLD, 14)); 54 | p1.add(l3); 55 | 56 | t3 = new JPasswordField(); 57 | t3.setBounds(190, 100, 200, 25); 58 | t3.setBorder(BorderFactory.createEmptyBorder()); 59 | p1.add(t3); 60 | 61 | JLabel l4 = new JLabel("Security Question:"); 62 | l4.setBounds(50, 140, 135, 25); 63 | l4.setFont(new Font("Tahoma", Font.BOLD, 14)); 64 | p1.add(l4); 65 | 66 | c1 = new Choice(); 67 | c1.add("What was your childhood nickname?"); 68 | c1.add("What primary school did you attend?"); 69 | c1.add("What school did you attend for sixth grade?"); 70 | c1.add("What are the last five digits of your driver's license number?"); 71 | c1.add("What time of the day were you born? (hh:mm)"); 72 | c1.setBounds(190, 140, 250, 25); 73 | p1.add(c1); 74 | 75 | JLabel l5 = new JLabel("Answer:"); 76 | l5.setBounds(50, 180, 100, 25); 77 | l5.setFont(new Font("Tahoma", Font.BOLD, 14)); 78 | p1.add(l5); 79 | 80 | t4 = new JTextField(); 81 | t4.setBounds(190, 180, 200, 25); 82 | t4.setBorder(BorderFactory.createEmptyBorder()); 83 | p1.add(t4); 84 | 85 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/signup.png")); 86 | Image i2 = i1.getImage().getScaledInstance(250, 250, Image.SCALE_DEFAULT); 87 | ImageIcon i3 = new ImageIcon(i2); 88 | JLabel l6 = new JLabel(i3); 89 | l6.setBounds(580, 30, 250, 250); 90 | this.add(l6); 91 | 92 | b1 = new JButton("Create"); 93 | b1.setBounds(80, 250, 100, 30); 94 | b1.setFont(new Font("Tahoma", Font.BOLD, 14)); 95 | b1.addActionListener(this); 96 | p1.add(b1); 97 | 98 | b2 = new JButton("Back"); 99 | b2.setBounds(290, 250, 100, 30); 100 | b2.setFont(new Font("Tahoma", Font.BOLD, 14)); 101 | b2.addActionListener(this); 102 | p1.add(b2); 103 | } 104 | 105 | public void actionPerformed (ActionEvent ae) { 106 | 107 | if (ae.getSource() == b1) { 108 | String username = t1.getText(); 109 | String name = t2.getText(); 110 | String password = t3.getText(); 111 | String security = c1.getSelectedItem(); 112 | String answer = t4.getText(); 113 | 114 | String query = "INSERT INTO account values ('"+username+"', '"+name+"', '"+password+"', '"+security+"', '"+answer+"')"; 115 | try { 116 | Conn c = new Conn(); 117 | c.s.executeUpdate(query); 118 | 119 | JOptionPane.showMessageDialog(null, "Account Created Successfully"); 120 | this.setVisible(false); 121 | new Login().setVisible(true); 122 | 123 | } catch (SQLException e) { 124 | System.out.println("Something Went Wrong: " + e.getMessage()); 125 | } 126 | 127 | } else if (ae.getSource() == b2) { 128 | this.setVisible(false); 129 | new Login().setVisible(true); 130 | } 131 | } 132 | 133 | public static void main(String[] args) { 134 | new SignUp().setVisible(true); 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /src/travel/management/system/ViewCustomer.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | 10 | public class ViewCustomer extends JFrame implements ActionListener { 11 | 12 | JButton b; 13 | 14 | ViewCustomer(String username) { 15 | 16 | this.setBounds(350, 150, 870, 600); 17 | this.getContentPane().setBackground(Color.WHITE); 18 | this.setLayout(null); 19 | 20 | JLabel l1 = new JLabel("Username : "); 21 | l1.setBounds(30, 50, 150, 25); 22 | this.add(l1); 23 | 24 | JLabel l11 = new JLabel(); 25 | l11.setBounds(220, 50, 150, 25); 26 | this.add(l11); 27 | 28 | JLabel l2 = new JLabel("ID : "); 29 | l2.setBounds(30, 110, 150, 25); 30 | this.add(l2); 31 | 32 | JLabel l12 = new JLabel(); 33 | l12.setBounds(220, 110, 150, 25); 34 | this.add(l12); 35 | 36 | JLabel l3 = new JLabel("ID Number : "); 37 | l3.setBounds(30, 170, 150, 25); 38 | this.add(l3); 39 | 40 | JLabel l13 = new JLabel(); 41 | l13.setBounds(220, 170, 150, 25); 42 | this.add(l13); 43 | 44 | JLabel l4 = new JLabel("Name : "); 45 | l4.setBounds(30, 230, 150, 25); 46 | this.add(l4); 47 | 48 | JLabel l14 = new JLabel(); 49 | l14.setBounds(220, 230, 150, 25); 50 | this.add(l14); 51 | 52 | JLabel l5 = new JLabel("Gender : "); 53 | l5.setBounds(30, 290, 150, 25); 54 | this.add(l5); 55 | 56 | JLabel l15 = new JLabel(); 57 | l15.setBounds(220, 290, 150, 25); 58 | this.add(l15); 59 | 60 | JLabel l6 = new JLabel("Country : "); 61 | l6.setBounds(500, 50, 150, 25); 62 | this.add(l6); 63 | 64 | JLabel l16 = new JLabel(); 65 | l16.setBounds(690, 50, 150, 25); 66 | this.add(l16); 67 | 68 | JLabel l7 = new JLabel("Address : "); 69 | l7.setBounds(500, 110, 150, 25); 70 | this.add(l7); 71 | 72 | JLabel l17 = new JLabel(); 73 | l17.setBounds(690, 110, 150, 25); 74 | this.add(l17); 75 | 76 | JLabel l8 = new JLabel("Phone : "); 77 | l8.setBounds(500, 170, 150, 25); 78 | this.add(l8); 79 | 80 | JLabel l18 = new JLabel(); 81 | l18.setBounds(690, 170, 150, 25); 82 | this.add(l18); 83 | 84 | JLabel l9 = new JLabel("E-Mail : "); 85 | l9.setBounds(500, 230, 150, 25); 86 | this.add(l9); 87 | 88 | JLabel l19 = new JLabel(); 89 | l19.setBounds(690, 230, 150, 25); 90 | this.add(l19); 91 | 92 | b = new JButton("Back"); 93 | b.setBackground(Color.BLACK); 94 | b.setForeground(Color.WHITE); 95 | b.setBounds(350, 350, 100, 25); 96 | b.addActionListener(this); 97 | this.add(b); 98 | 99 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/viewall.jpg")); 100 | Image i2 = i1.getImage().getScaledInstance(600, 200, Image.SCALE_DEFAULT); 101 | ImageIcon i3 = new ImageIcon(i2); 102 | JLabel l10 = new JLabel(i3); 103 | l10.setBounds(0, 400, 600, 200); 104 | this.add(l10); 105 | 106 | ImageIcon i4 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/viewall.jpg")); 107 | Image i5 = i4.getImage().getScaledInstance(600, 200, Image.SCALE_DEFAULT); 108 | ImageIcon i6 = new ImageIcon(i5); 109 | JLabel l20 = new JLabel(i6); 110 | l20.setBounds(600, 400, 600, 200); 111 | this.add(l20); 112 | 113 | try { 114 | Conn c = new Conn(); 115 | ResultSet rs = c.s.executeQuery("SELECT * FROM customer WHERE username = '"+username+"'"); 116 | while (rs.next()) { 117 | l11.setText(rs.getString("username")); 118 | l12.setText(rs.getString("id")); 119 | l13.setText(rs.getString("number")); 120 | l14.setText(rs.getString("name")); 121 | l15.setText(rs.getString("gender")); 122 | l16.setText(rs.getString("country")); 123 | l17.setText(rs.getString("address")); 124 | l18.setText(rs.getString("phone")); 125 | l19.setText(rs.getString("email")); 126 | } 127 | 128 | } catch (SQLException e) { 129 | System.out.println("Something Went Wrong: " + e.getMessage()); 130 | } 131 | } 132 | 133 | public void actionPerformed (ActionEvent ae) { 134 | if (ae.getSource() == b) { 135 | this.setVisible(false); 136 | } 137 | } 138 | 139 | public static void main(String[] args) { 140 | new ViewCustomer("Anonymous").setVisible(true); 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /src/travel/management/system/ViewBookedHotel.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | 10 | public class ViewBookedHotel extends JFrame implements ActionListener { 11 | 12 | JButton b; 13 | 14 | ViewBookedHotel (String username) { 15 | 16 | this.setBounds(350, 180, 1000, 600); 17 | this.getContentPane().setBackground(Color.WHITE); 18 | this.setLayout(null); 19 | 20 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/booKedDetails.jpg")); 21 | Image i2 = i1.getImage().getScaledInstance(500, 400, Image.SCALE_DEFAULT); 22 | ImageIcon i3 = new ImageIcon(i2); 23 | JLabel l = new JLabel(i3); 24 | l.setBounds(450, 20, 500, 400); 25 | this.add(l); 26 | 27 | JLabel heading = new JLabel("VIEW BOOKED HOTEL DETAILS"); 28 | heading.setBounds(60, 0, 500, 30); 29 | heading.setFont(new Font("Tahoma", Font.BOLD, 20)); 30 | this.add(heading); 31 | 32 | JLabel l1 = new JLabel("Username: "); 33 | l1.setBounds(30, 50, 100, 30); 34 | this.add(l1); 35 | 36 | JLabel l11 = new JLabel(); 37 | l11.setBounds(250, 50, 200, 30); 38 | this.add(l11); 39 | 40 | JLabel l2 = new JLabel("Hotel Name: "); 41 | l2.setBounds(30, 90, 100, 30); 42 | this.add(l2); 43 | 44 | JLabel l12 = new JLabel(); 45 | l12.setBounds(250, 90, 200, 30); 46 | this.add(l12); 47 | 48 | JLabel l3 = new JLabel("Total Persons: "); 49 | l3.setBounds(30, 130, 100, 30); 50 | this.add(l3); 51 | 52 | JLabel l13 = new JLabel(); 53 | l13.setBounds(250, 130, 200, 30); 54 | this.add(l13); 55 | 56 | JLabel l4 = new JLabel("Total Days: "); 57 | l4.setBounds(30, 170, 100, 30); 58 | this.add(l4); 59 | 60 | JLabel l14 = new JLabel(); 61 | l14.setBounds(250, 170, 200, 30); 62 | this.add(l14); 63 | 64 | JLabel l5 = new JLabel("AC Included?: "); 65 | l5.setBounds(30, 210, 100, 30); 66 | this.add(l5); 67 | 68 | JLabel l15 = new JLabel(); 69 | l15.setBounds(250, 210, 200, 30); 70 | this.add(l15); 71 | 72 | JLabel l6 = new JLabel("Food Included?: "); 73 | l6.setBounds(30, 250, 100, 30); 74 | this.add(l6); 75 | 76 | JLabel l16 = new JLabel(); 77 | l16.setBounds(250, 250, 200, 30); 78 | this.add(l16); 79 | 80 | JLabel l7 = new JLabel("ID: "); 81 | l7.setBounds(30, 290, 100, 30); 82 | this.add(l7); 83 | 84 | JLabel l17 = new JLabel(); 85 | l17.setBounds(250, 290, 200, 30); 86 | this.add(l17); 87 | 88 | JLabel l8 = new JLabel("Number: "); 89 | l8.setBounds(30, 330, 100, 30); 90 | this.add(l8); 91 | 92 | JLabel l18 = new JLabel(); 93 | l18.setBounds(250, 330, 200, 30); 94 | this.add(l18); 95 | 96 | JLabel l9 = new JLabel("Phone: "); 97 | l9.setBounds(30, 370, 100, 30); 98 | this.add(l9); 99 | 100 | JLabel l19 = new JLabel(); 101 | l19.setBounds(250, 370, 200, 30); 102 | this.add(l19); 103 | 104 | JLabel l10 = new JLabel("Total Cost: "); 105 | l10.setBounds(30, 410, 100, 30); 106 | this.add(l10); 107 | 108 | JLabel l20 = new JLabel(); 109 | l20.setBounds(250, 410, 200, 30); 110 | this.add(l20); 111 | 112 | try { 113 | 114 | Conn c = new Conn(); 115 | ResultSet rs = c.s.executeQuery("SELECT * FROM bookHotel WHERE username = '"+username+"'"); 116 | 117 | while (rs.next()) { 118 | l11.setText(rs.getString(1)); 119 | l12.setText(rs.getString(2)); 120 | l13.setText(rs.getString(3)); 121 | l14.setText(rs.getString(4)); 122 | l15.setText(rs.getString(5)); 123 | l16.setText(rs.getString(6)); 124 | l17.setText(rs.getString(7)); 125 | l18.setText(rs.getString(8)); 126 | l19.setText(rs.getString(9)); 127 | l20.setText(rs.getString(10)); 128 | } 129 | } catch (SQLException e) { 130 | e.getMessage(); 131 | } 132 | 133 | b = new JButton("Back"); 134 | b.setBackground(Color.BLACK); 135 | b.setForeground(Color.WHITE); 136 | b.setBounds(130, 470, 100, 25); 137 | b.addActionListener(this); 138 | this.add(b); 139 | } 140 | 141 | public void actionPerformed (ActionEvent ae) { 142 | this.setVisible(false); 143 | } 144 | 145 | public static void main(String[] args) { 146 | new ViewBookedHotel("Anonymous").setVisible(true); 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /src/travel/management/system/ForgetPassword.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | 10 | public class ForgetPassword extends JFrame implements ActionListener { 11 | 12 | JTextField t1, t2, t3, t4,t5; 13 | JButton b1, b2, b3; 14 | 15 | ForgetPassword () { 16 | 17 | super("Forget Password"); 18 | 19 | this.setBounds(350, 100, 850, 380); 20 | this.getContentPane().setBackground(Color.WHITE); 21 | this.setLayout(null); 22 | 23 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/forgotpassword.jpg")); 24 | Image i2 = i1.getImage().getScaledInstance(200, 200, Image.SCALE_DEFAULT); 25 | ImageIcon i3 = new ImageIcon(i2); 26 | JLabel l6 = new JLabel(i3); 27 | l6.setBounds(580, 70, 200, 200); 28 | this.add(l6); 29 | 30 | JPanel p = new JPanel(); 31 | p.setLayout(null); 32 | p.setBounds(30, 25, 500, 280); 33 | p.setBackground(new Color(133, 193, 233)); 34 | this.add(p); 35 | 36 | JLabel l1 = new JLabel("Username"); 37 | l1.setBounds(40, 20, 100, 25); 38 | l1.setFont(new Font("Tahoma", Font.BOLD, 14)); 39 | p.add(l1); 40 | 41 | t1 = new JTextField(); 42 | t1.setBounds(200, 25, 160, 25); 43 | t1.setBorder(BorderFactory.createEmptyBorder()); 44 | p.add(t1); 45 | 46 | b1 = new JButton("Search"); 47 | b1.setBounds(380, 25, 100, 25); 48 | b1.setBackground(Color.DARK_GRAY); 49 | b1.setForeground(Color.WHITE); 50 | b1.addActionListener(this); 51 | p.add(b1); 52 | 53 | JLabel l2 = new JLabel("Name"); 54 | l2.setBounds(40, 60, 100, 25); 55 | l2.setFont(new Font("Tahoma", Font.BOLD, 14)); 56 | p.add(l2); 57 | 58 | t2 = new JTextField(); 59 | t2.setBounds(200, 65, 160, 25); 60 | t2.setBorder(BorderFactory.createEmptyBorder()); 61 | p.add(t2); 62 | 63 | JLabel l3 = new JLabel("Security Question:"); 64 | l3.setBounds(40, 100, 170, 25); 65 | l3.setFont(new Font("Tahoma", Font.BOLD, 14)); 66 | p.add(l3); 67 | 68 | t3 = new JTextField(); 69 | t3.setBounds(200, 105, 280, 25); 70 | t3.setBorder(BorderFactory.createEmptyBorder()); 71 | p.add(t3); 72 | 73 | JLabel l4 = new JLabel("Answer:"); 74 | l4.setBounds(40, 140, 210, 25); 75 | l4.setFont(new Font("Tahoma", Font.BOLD, 14)); 76 | p.add(l4); 77 | 78 | t4 = new JTextField(); 79 | t4.setBounds(200, 150, 160, 25); 80 | t4.setBorder(BorderFactory.createEmptyBorder()); 81 | p.add(t4); 82 | 83 | b2 = new JButton("Retrieve"); 84 | b2.setBounds(380, 150, 100, 25); 85 | b2.setBackground(Color.DARK_GRAY); 86 | b2.setForeground(Color.WHITE); 87 | b2.addActionListener(this); 88 | p.add(b2); 89 | 90 | JLabel l5 = new JLabel("Password"); 91 | l5.setBounds(40, 180, 210, 25); 92 | l5.setFont(new Font("Tahoma", Font.BOLD, 14)); 93 | p.add(l5); 94 | 95 | t5 = new JTextField(); 96 | t5.setBounds(200, 195, 160, 25); 97 | t5.setBorder(BorderFactory.createEmptyBorder()); 98 | p.add(t5); 99 | 100 | b3 = new JButton("Back"); 101 | b3.setBounds(150, 250, 100, 25); 102 | b3.setBackground(Color.DARK_GRAY); 103 | b3.setForeground(Color.WHITE); 104 | b3.addActionListener(this); 105 | p.add(b3); 106 | } 107 | 108 | public void actionPerformed (ActionEvent ae) { 109 | 110 | Conn c = new Conn(); 111 | 112 | if (ae.getSource() == b1) { 113 | try { 114 | String sql = "SELECT * FROM account WHERE username = '"+t1.getText()+"'"; 115 | ResultSet rs = c.s.executeQuery(sql); 116 | while (rs.next()) { 117 | t2.setText(rs.getString("name")); 118 | t3.setText(rs.getString("security")); 119 | } 120 | 121 | } catch (SQLException e) { 122 | System.out.println("Something Went Wrong: " + e.getMessage()); 123 | } 124 | } else if (ae.getSource() == b2) { 125 | try { 126 | String sql = "SELECT * FROM account WHERE answer = '"+t4.getText()+"' AND username = '" + t1.getText() + "'"; 127 | ResultSet rs = c.s.executeQuery(sql); 128 | while (rs.next()) { 129 | t5.setText(rs.getString("password")); 130 | } 131 | 132 | } catch (SQLException e) { 133 | System.out.println("Something Went Wrong: " + e.getMessage()); 134 | } 135 | } else if (ae.getSource() == b3) { 136 | this.setVisible(false); 137 | new Login().setVisible(true); 138 | } 139 | } 140 | 141 | public static void main(String[] args) { 142 | new ForgetPassword().setVisible(true); 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /src/travel/management/system/AddCustomer.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | 10 | public class AddCustomer extends JFrame implements ActionListener { 11 | 12 | JTextField t1, t2, t3, t4, t5, t6, t7; 13 | JComboBox c1; 14 | JRadioButton r1, r2; 15 | JButton b1, b2; 16 | 17 | AddCustomer (String username) { 18 | 19 | this.setBounds(350, 150, 850, 550); 20 | this.getContentPane().setBackground(Color.WHITE); 21 | this.setLayout(null); 22 | 23 | JLabel heading = new JLabel("ADD CUSTOMER DETAILS"); 24 | heading.setFont(new Font("Tahoma", Font.BOLD, 20)); 25 | heading.setBounds(50, 0, 300, 25); 26 | this.add(heading); 27 | 28 | JLabel l1 = new JLabel("Username : "); 29 | l1.setBounds(30, 50, 150, 25); 30 | this.add(l1); 31 | 32 | t1 = new JTextField(); 33 | t1.setBounds(180, 50, 200, 25); 34 | this.add(t1); 35 | 36 | JLabel l2 = new JLabel("ID : "); 37 | l2.setBounds(30, 90, 150, 25); 38 | this.add(l2); 39 | 40 | c1 = new JComboBox(new String[] {"Passport", "Voter ID Card", "Aadhaar Card", "Driving License", "PAN Card"}); 41 | c1.setBounds(180, 90, 200, 25); 42 | this.add(c1); 43 | 44 | JLabel l3 = new JLabel("ID Number : "); 45 | l3.setBounds(30, 130, 150, 25); 46 | this.add(l3); 47 | 48 | t2 = new JTextField(); 49 | t2.setBounds(180, 130, 200, 25); 50 | this.add(t2); 51 | 52 | JLabel l4 = new JLabel("Name : "); 53 | l4.setBounds(30, 170, 150, 25); 54 | this.add(l4); 55 | 56 | t3 = new JTextField(); 57 | t3.setBounds(180, 170, 200, 25); 58 | this.add(t3); 59 | 60 | JLabel l5 = new JLabel("Gender : "); 61 | l5.setBounds(30, 210, 150, 25); 62 | this.add(l5); 63 | 64 | r1 = new JRadioButton("Male"); 65 | r1.setBackground(Color.WHITE); 66 | r1.setBounds(180, 210, 70, 25); 67 | this.add(r1); 68 | 69 | r2 = new JRadioButton("Female"); 70 | r2.setBackground(Color.WHITE); 71 | r2.setBounds(270, 210, 70, 25); 72 | this.add(r2); 73 | 74 | JLabel l6 = new JLabel("Country : "); 75 | l6.setBounds(30, 250, 150, 25); 76 | this.add(l6); 77 | 78 | t4 = new JTextField(); 79 | t4.setBounds(180, 250, 200, 25); 80 | this.add(t4); 81 | 82 | JLabel l7 = new JLabel("Address : "); 83 | l7.setBounds(30, 290, 150, 25); 84 | this.add(l7); 85 | 86 | t5 = new JTextField(); 87 | t5.setBounds(180, 290, 200, 25); 88 | this.add(t5); 89 | 90 | JLabel l8 = new JLabel("Phone : "); 91 | l8.setBounds(30, 330, 150, 25); 92 | this.add(l8); 93 | 94 | t6 = new JTextField(); 95 | t6.setBounds(180, 330, 200, 25); 96 | this.add(t6); 97 | 98 | JLabel l9 = new JLabel("E-Mail : "); 99 | l9.setBounds(30, 370, 150, 25); 100 | this.add(l9); 101 | 102 | t7 = new JTextField(); 103 | t7.setBounds(180, 370, 200, 25); 104 | this.add(t7); 105 | 106 | b1 = new JButton("Add"); 107 | b1.setBackground(Color.BLACK); 108 | b1.setForeground(Color.WHITE); 109 | b1.setBounds(70, 430, 100, 25); 110 | b1.addActionListener(this); 111 | this.add(b1); 112 | 113 | b2 = new JButton("Back"); 114 | b2.setBackground(Color.BLACK); 115 | b2.setForeground(Color.WHITE); 116 | b2.setBounds(220, 430, 100, 25); 117 | b2.addActionListener(this); 118 | this.add(b2); 119 | 120 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/newcustomer.jpg")); 121 | Image i2 = i1.getImage().getScaledInstance(400, 500, Image.SCALE_DEFAULT); 122 | ImageIcon i3 = new ImageIcon(i2); 123 | JLabel l10 = new JLabel(i3); 124 | l10.setBounds(400, 40, 450, 420); 125 | this.add(l10); 126 | 127 | try { 128 | Conn c = new Conn(); 129 | ResultSet rs = c.s.executeQuery("SELECT * FROM account WHERE username = '"+username+"'"); 130 | while (rs.next()) { 131 | t1.setText(rs.getString("username")); 132 | t3.setText(rs.getString("name")); 133 | } 134 | 135 | } catch (SQLException e) { 136 | System.out.println("Something Went Wrong: " + e.getMessage()); 137 | } 138 | } 139 | 140 | public void actionPerformed (ActionEvent ae) { 141 | 142 | String username = t1.getText(); 143 | String id = (String) (c1.getSelectedItem()); 144 | String number = t2.getText(); 145 | String name = t3.getText(); 146 | String gender = null; 147 | if (r1.isSelected()) { 148 | gender = "Male"; 149 | } else if (r2.isSelected()) { 150 | gender = "Female"; 151 | } 152 | String country = t4.getText(); 153 | String address = t4.getText(); 154 | String phone = t4.getText(); 155 | String email = t4.getText(); 156 | 157 | if (ae.getSource() == b1) { 158 | 159 | String q = "INSERT INTO customer values ('"+username+"', '"+id+"', '"+number+"', '"+name+"', '"+gender+"'," + 160 | "'"+country+"', '"+address+"', '"+phone+"', '"+email+"')"; 161 | try { 162 | Conn c = new Conn(); 163 | c.s.executeUpdate(q); 164 | 165 | JOptionPane.showMessageDialog(null, "Customer Details Added Successfully"); 166 | this.setVisible(false); 167 | 168 | } catch (SQLException e) { 169 | System.out.println("Something Went Wrong: " + e.getMessage()); 170 | } 171 | 172 | } else if (ae.getSource() == b2) { 173 | this.setVisible(false); 174 | } 175 | } 176 | 177 | public static void main(String[] args) { 178 | new AddCustomer("Anonymous").setVisible(true); 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /src/travel/management/system/UpdateCustomer.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | 10 | public class UpdateCustomer extends JFrame implements ActionListener { 11 | 12 | JTextField t1, t2, t3, t4, t5, t6, t7, t8, t9; 13 | JComboBox c1; 14 | JRadioButton r1, r2; 15 | JButton b1, b2; 16 | 17 | UpdateCustomer (String username) { 18 | 19 | this.setBounds(350, 150, 850, 550); 20 | this.getContentPane().setBackground(Color.WHITE); 21 | this.setLayout(null); 22 | 23 | JLabel heading = new JLabel("UPDATE CUSTOMER DETAILS"); 24 | heading.setFont(new Font("Tahoma", Font.BOLD, 20)); 25 | heading.setBounds(50, 0, 300, 25); 26 | this.add(heading); 27 | 28 | JLabel l1 = new JLabel("Username : "); 29 | l1.setBounds(30, 50, 150, 25); 30 | this.add(l1); 31 | 32 | t1 = new JTextField(); 33 | t1.setBounds(180, 50, 200, 25); 34 | this.add(t1); 35 | 36 | JLabel l2 = new JLabel("ID : "); 37 | l2.setBounds(30, 90, 150, 25); 38 | this.add(l2); 39 | 40 | t8 = new JTextField(); 41 | t8.setBounds(180, 90, 200, 25); 42 | this.add(t8); 43 | 44 | JLabel l3 = new JLabel("ID Number : "); 45 | l3.setBounds(30, 130, 150, 25); 46 | this.add(l3); 47 | 48 | t2 = new JTextField(); 49 | t2.setBounds(180, 130, 200, 25); 50 | this.add(t2); 51 | 52 | JLabel l4 = new JLabel("Name : "); 53 | l4.setBounds(30, 170, 150, 25); 54 | this.add(l4); 55 | 56 | t3 = new JTextField(); 57 | t3.setBounds(180, 170, 200, 25); 58 | this.add(t3); 59 | 60 | JLabel l5 = new JLabel("Gender : "); 61 | l5.setBounds(30, 210, 150, 25); 62 | this.add(l5); 63 | 64 | t9 = new JTextField(); 65 | t9.setBackground(Color.WHITE); 66 | t9.setBounds(180, 210, 200, 25); 67 | this.add(t9); 68 | 69 | JLabel l6 = new JLabel("Country : "); 70 | l6.setBounds(30, 250, 150, 25); 71 | this.add(l6); 72 | 73 | t4 = new JTextField(); 74 | t4.setBounds(180, 250, 200, 25); 75 | this.add(t4); 76 | 77 | JLabel l7 = new JLabel("Address : "); 78 | l7.setBounds(30, 290, 150, 25); 79 | this.add(l7); 80 | 81 | t5 = new JTextField(); 82 | t5.setBounds(180, 290, 200, 25); 83 | this.add(t5); 84 | 85 | JLabel l8 = new JLabel("Phone : "); 86 | l8.setBounds(30, 330, 150, 25); 87 | this.add(l8); 88 | 89 | t6 = new JTextField(); 90 | t6.setBounds(180, 330, 200, 25); 91 | this.add(t6); 92 | 93 | JLabel l9 = new JLabel("E-Mail : "); 94 | l9.setBounds(30, 370, 150, 25); 95 | this.add(l9); 96 | 97 | t7 = new JTextField(); 98 | t7.setBounds(180, 370, 200, 25); 99 | this.add(t7); 100 | 101 | b1 = new JButton("Update"); 102 | b1.setBackground(Color.BLACK); 103 | b1.setForeground(Color.WHITE); 104 | b1.setBounds(70, 430, 100, 25); 105 | b1.addActionListener(this); 106 | this.add(b1); 107 | 108 | b2 = new JButton("Back"); 109 | b2.setBackground(Color.BLACK); 110 | b2.setForeground(Color.WHITE); 111 | b2.setBounds(220, 430, 100, 25); 112 | b2.addActionListener(this); 113 | this.add(b2); 114 | 115 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/update.png")); 116 | Image i2 = i1.getImage().getScaledInstance(400, 400, Image.SCALE_DEFAULT); 117 | ImageIcon i3 = new ImageIcon(i2); 118 | JLabel l10 = new JLabel(i3); 119 | l10.setBounds(400, 40, 400, 400); 120 | this.add(l10); 121 | 122 | try { 123 | Conn c = new Conn(); 124 | ResultSet rs = c.s.executeQuery("SELECT * FROM account WHERE username = '"+username+"'"); 125 | while (rs.next()) { 126 | t1.setText(rs.getString("username")); 127 | t2.setText(rs.getString("id")); 128 | t3.setText(rs.getString("number")); 129 | t4.setText(rs.getString("name")); 130 | t5.setText(rs.getString("gender")); 131 | t6.setText(rs.getString("country")); 132 | t7.setText(rs.getString("address")); 133 | t7.setText(rs.getString("phone")); 134 | t9.setText(rs.getString("email")); 135 | } 136 | 137 | } catch (SQLException e) { 138 | System.out.println("Something Went Wrong: " + e.getMessage()); 139 | } 140 | } 141 | 142 | public void actionPerformed (ActionEvent ae) { 143 | 144 | String username = t1.getText(); 145 | String id = t2.getText(); 146 | String number = t3.getText(); 147 | String name = t4.getText(); 148 | String gender = t5.getText(); 149 | String country = t6.getText(); 150 | String address = t7.getText(); 151 | String phone = t8.getText(); 152 | String email = t9.getText(); 153 | 154 | if (ae.getSource() == b1) { 155 | 156 | String q = "UPDATE customer set username = '"+username+"', id = '"+id+"', number = '"+number+"'," + 157 | "name = '"+name+"', gender = '"+gender+"', country = '"+country+"', address = '"+address+"'," + 158 | "phone = '"+phone+"', email = '"+email+"')"; 159 | try { 160 | Conn c = new Conn(); 161 | c.s.executeUpdate(q); 162 | 163 | JOptionPane.showMessageDialog(null, "Customer Details Updated Successfully"); 164 | this.setVisible(false); 165 | 166 | } catch (SQLException e) { 167 | System.out.println("Something Went Wrong: " + e.getMessage()); 168 | } 169 | 170 | } else if (ae.getSource() == b2) { 171 | this.setVisible(false); 172 | } 173 | } 174 | 175 | public static void main(String[] args) { 176 | new UpdateCustomer("Anonymous").setVisible(true); 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /src/travel/management/system/BookPackage.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | 10 | public class BookPackage extends JFrame implements ActionListener { 11 | 12 | Choice c1; 13 | JLabel l11, l12, l13, l14, l15; 14 | JTextField t1; 15 | JButton b1, b2, b3; 16 | 17 | BookPackage (String username) { 18 | 19 | this.setBounds(300, 150, 1100, 500); 20 | this.getContentPane().setBackground(Color.WHITE); 21 | this.setLayout(null); 22 | 23 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/bookpackage.jpg")); 24 | Image i2 = i1.getImage().getScaledInstance(500, 300, Image.SCALE_DEFAULT); 25 | ImageIcon i3 = new ImageIcon(i2); 26 | JLabel l16= new JLabel(i3); 27 | l16.setBounds(550, 50, 500, 300); 28 | this.add(l16); 29 | 30 | JLabel l1 = new JLabel("BOOK PACKAGE"); 31 | l1.setFont(new Font("Yu Mincho", Font.BOLD, 20)); 32 | l1.setBounds(100, 10, 200, 30); 33 | this.add(l1); 34 | 35 | JLabel l2 = new JLabel("Username: "); 36 | l2.setFont(new Font("Tahoma", Font.PLAIN, 16)); 37 | l2.setBounds(40, 70, 100, 30); 38 | this.add(l2); 39 | 40 | l11 = new JLabel(); 41 | l11.setFont(new Font("Tahoma", Font.PLAIN, 16)); 42 | l11.setBounds(250, 70, 250, 30); 43 | this.add(l11); 44 | 45 | JLabel l3 = new JLabel("Select Package: "); 46 | l3.setFont(new Font("Tahoma", Font.PLAIN, 16)); 47 | l3.setBounds(40, 110, 150, 30); 48 | this.add(l3); 49 | 50 | c1 = new Choice(); 51 | c1.add("Gold Package"); 52 | c1.add("Silver Package"); 53 | c1.add("Bronze Package"); 54 | c1.setBounds(250, 110, 250, 30); 55 | this.add(c1); 56 | 57 | JLabel l4 = new JLabel("Total Persons: "); 58 | l4.setFont(new Font("Tahoma", Font.PLAIN, 16)); 59 | l4.setBounds(40, 150, 150, 30); 60 | this.add(l4); 61 | 62 | t1 = new JTextField("1"); 63 | t1.setBounds(250, 150, 200, 25); 64 | this.add(t1); 65 | 66 | JLabel l5 = new JLabel("ID: "); 67 | l5.setFont(new Font("Tahoma", Font.PLAIN, 16)); 68 | l5.setBounds(40, 190, 100, 30); 69 | this.add(l5); 70 | 71 | l12 = new JLabel(); 72 | l12.setFont(new Font("Tahoma", Font.PLAIN, 16)); 73 | l12.setBounds(250, 190, 250, 30); 74 | this.add(l12); 75 | 76 | JLabel l6 = new JLabel("Number: "); 77 | l6.setFont(new Font("Tahoma", Font.PLAIN, 16)); 78 | l6.setBounds(40, 230, 100, 30); 79 | this.add(l6); 80 | 81 | l13 = new JLabel(); 82 | l13.setFont(new Font("Tahoma", Font.PLAIN, 16)); 83 | l13.setBounds(250, 230, 250, 30); 84 | this.add(l13); 85 | 86 | JLabel l7 = new JLabel("Phone: "); 87 | l7.setFont(new Font("Tahoma", Font.PLAIN, 16)); 88 | l7.setBounds(40, 270, 100, 30); 89 | this.add(l7); 90 | 91 | l14 = new JLabel(); 92 | l14.setFont(new Font("Tahoma", Font.PLAIN, 16)); 93 | l14.setBounds(250, 270, 250, 30); 94 | this.add(l14); 95 | 96 | JLabel l8 = new JLabel("Total Price: "); 97 | l8.setFont(new Font("Tahoma", Font.PLAIN, 16)); 98 | l8.setBounds(40, 310, 100, 30); 99 | this.add(l8); 100 | 101 | l15 = new JLabel(); 102 | l15.setFont(new Font("Tahoma", Font.PLAIN, 16)); 103 | l15.setForeground(Color.RED); 104 | l15.setBounds(250, 310, 250, 30); 105 | this.add(l15); 106 | 107 | try { 108 | Conn c = new Conn(); 109 | ResultSet rs = c.s.executeQuery("SELECT * FROM customer WHERE username = '"+username+"'"); 110 | while (rs.next()) { 111 | l11.setText(rs.getString("username")); 112 | l12.setText(rs.getString("id")); 113 | l11.setText(rs.getString("number")); 114 | l11.setText(rs.getString("phone")); 115 | } 116 | 117 | } catch (SQLException e) { 118 | e.getMessage(); 119 | } 120 | 121 | b1 = new JButton("Check Price"); 122 | b1.setBackground(Color.BLACK); 123 | b1.setForeground(Color.WHITE); 124 | b1.setBounds(60, 380, 120, 25); 125 | b1.addActionListener(this); 126 | this.add(b1); 127 | 128 | b2 = new JButton("Book Package"); 129 | b2.setBackground(Color.BLACK); 130 | b2.setForeground(Color.WHITE); 131 | b2.setBounds(200, 380, 120, 25); 132 | b2.addActionListener(this); 133 | this.add(b2); 134 | 135 | b3 = new JButton("Back"); 136 | b3.setBackground(Color.BLACK); 137 | b3.setForeground(Color.WHITE); 138 | b3.setBounds(340, 380, 120, 25); 139 | b3.addActionListener(this); 140 | this.add(b3); 141 | } 142 | 143 | public void actionPerformed (ActionEvent ae) { 144 | if (ae.getSource() == b1) { 145 | 146 | String p = c1.getSelectedItem(); 147 | 148 | int price = 0; 149 | 150 | if (p.equals("Gold Package")) { 151 | price += 12000; 152 | } else if (p.equals("Silver Package")) { 153 | price += 25000; 154 | } else if (p.equals("Bronze Package")) { 155 | price += 32000; 156 | } 157 | 158 | int persons = Integer.parseInt(t1.getText()); 159 | price *= persons; 160 | 161 | l15.setText("Rs. " + price); 162 | 163 | } else if (ae.getSource() == b2) { 164 | try { 165 | Conn c = new Conn(); 166 | c.s.executeUpdate("INSERT INTO bookPackage values ('"+l11.getText()+"', '"+c1.getSelectedItem()+"'," + 167 | "'"+t1.getText()+"', '"+l12.getText()+"', '"+l13.getText()+"', '"+l14.getText()+"'," + 168 | "'"+l15.getText()+"')"); 169 | JOptionPane.showMessageDialog(null, "Package Booked Successfully"); 170 | this.setVisible(false); 171 | 172 | } catch (SQLException e) { 173 | e.getMessage(); 174 | } 175 | } else if (ae.getSource() == b3) { 176 | this.setVisible(false); 177 | } 178 | } 179 | 180 | public static void main(String[] args) { 181 | new BookPackage("Anonymous").setVisible(true); 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /src/travel/management/system/DeleteCustomer.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.imageio.spi.ImageWriterSpi; 4 | import javax.swing.*; 5 | import java.awt.*; 6 | import java.awt.event.ActionEvent; 7 | import java.awt.event.ActionListener; 8 | import java.sql.ResultSet; 9 | import java.sql.SQLException; 10 | 11 | public class DeleteCustomer extends JFrame implements ActionListener { 12 | 13 | JButton b1, b2; 14 | String username; 15 | 16 | DeleteCustomer (String user) { 17 | 18 | this.username = user; 19 | 20 | this.setBounds(350, 150, 850, 550); 21 | this.getContentPane().setBackground(Color.WHITE); 22 | this.setLayout(null); 23 | 24 | JLabel heading = new JLabel("DELETE CUSTOMER DETAILS"); 25 | heading.setFont(new Font("Tahoma", Font.BOLD, 20)); 26 | heading.setForeground(Color.RED); 27 | heading.setBounds(110, 10, 300, 30); 28 | this.add(heading); 29 | 30 | JLabel l1 = new JLabel("Username: "); 31 | l1.setFont(new Font("Tahoma", Font.PLAIN, 16)); 32 | l1.setBounds(30, 70, 200, 16); 33 | this.add(l1); 34 | 35 | JLabel l11 = new JLabel(); 36 | l11.setFont(new Font("Tahoma", Font.PLAIN, 16)); 37 | l11.setBounds(250, 70, 200, 16); 38 | this.add(l11); 39 | 40 | JLabel l2 = new JLabel("Name: "); 41 | l2.setFont(new Font("Tahoma", Font.PLAIN, 16)); 42 | l2.setBounds(30, 110, 200, 16); 43 | this.add(l2); 44 | 45 | JLabel l12 = new JLabel(); 46 | l12.setFont(new Font("Tahoma", Font.PLAIN, 16)); 47 | l12.setBounds(250, 110, 200, 16); 48 | this.add(l12); 49 | 50 | JLabel l3 = new JLabel("ID: "); 51 | l3.setFont(new Font("Tahoma", Font.PLAIN, 16)); 52 | l3.setBounds(30, 150, 200, 16); 53 | this.add(l3); 54 | 55 | JLabel l13 = new JLabel(); 56 | l13.setFont(new Font("Tahoma", Font.PLAIN, 16)); 57 | l13.setBounds(250, 150, 200, 16); 58 | this.add(l13); 59 | 60 | JLabel l4 = new JLabel("Number: "); 61 | l4.setFont(new Font("Tahoma", Font.PLAIN, 16)); 62 | l4.setBounds(30, 190, 200, 16); 63 | this.add(l4); 64 | 65 | JLabel l14 = new JLabel(); 66 | l14.setFont(new Font("Tahoma", Font.PLAIN, 16)); 67 | l14.setBounds(250, 190, 200, 16); 68 | this.add(l14); 69 | 70 | JLabel l5 = new JLabel("Gender: "); 71 | l5.setFont(new Font("Tahoma", Font.PLAIN, 16)); 72 | l5.setBounds(30, 230, 200, 16); 73 | this.add(l5); 74 | 75 | JLabel l15 = new JLabel(); 76 | l15.setFont(new Font("Tahoma", Font.PLAIN, 16)); 77 | l15.setBounds(250, 230, 200, 16); 78 | this.add(l15); 79 | 80 | JLabel l6 = new JLabel("Country: "); 81 | l6.setFont(new Font("Tahoma", Font.PLAIN, 16)); 82 | l6.setBounds(30, 270, 200, 16); 83 | this.add(l6); 84 | 85 | JLabel l16 = new JLabel(); 86 | l16.setFont(new Font("Tahoma", Font.PLAIN, 16)); 87 | l16.setBounds(250, 270, 200, 16); 88 | this.add(l16); 89 | 90 | JLabel l7 = new JLabel("Address: "); 91 | l7.setFont(new Font("Tahoma", Font.PLAIN, 16)); 92 | l7.setBounds(30, 310, 200, 16); 93 | this.add(l7); 94 | 95 | JLabel l17 = new JLabel(); 96 | l17.setFont(new Font("Tahoma", Font.PLAIN, 16)); 97 | l17.setBounds(250, 310, 200, 16); 98 | this.add(l17); 99 | 100 | JLabel l8 = new JLabel("Phone: "); 101 | l8.setFont(new Font("Tahoma", Font.PLAIN, 16)); 102 | l8.setBounds(30, 350, 200, 16); 103 | this.add(l8); 104 | 105 | JLabel l18 = new JLabel(); 106 | l18.setFont(new Font("Tahoma", Font.PLAIN, 16)); 107 | l18.setBounds(250, 350, 200, 16); 108 | this.add(l18); 109 | 110 | JLabel l9 = new JLabel("E-Mail: "); 111 | l9.setFont(new Font("Tahoma", Font.PLAIN, 16)); 112 | l9.setBounds(30, 390, 200, 16); 113 | this.add(l9); 114 | 115 | JLabel l19 = new JLabel(); 116 | l19.setFont(new Font("Tahoma", Font.PLAIN, 16)); 117 | l19.setBounds(250, 390, 200, 16); 118 | this.add(l19); 119 | 120 | try { 121 | Conn c = new Conn(); 122 | ResultSet rs = c.s.executeQuery("SELECT * FROM customer WHERE username = '"+username+"'"); 123 | while (rs.next()) { 124 | l11.setText(rs.getString("username")); 125 | l12.setText(rs.getString("name")); 126 | l13.setText(rs.getString("id")); 127 | l14.setText(rs.getString("number")); 128 | l15.setText(rs.getString("gender")); 129 | l16.setText(rs.getString("country")); 130 | l17.setText(rs.getString("address")); 131 | l18.setText(rs.getString("phone")); 132 | l19.setText(rs.getString("email")); 133 | } 134 | 135 | } catch (SQLException e) { 136 | e.getMessage(); 137 | } 138 | 139 | b1 = new JButton("Delete"); 140 | b1.setBackground(Color.BLACK); 141 | b1.setForeground(Color.WHITE); 142 | b1.setBounds(80, 450, 120, 25); 143 | b1.addActionListener(this); 144 | this.add(b1); 145 | 146 | b2 = new JButton("Back"); 147 | b2.setBackground(Color.BLACK); 148 | b2.setForeground(Color.WHITE); 149 | b2.setBounds(250, 450, 120, 25); 150 | b2.addActionListener(this); 151 | this.add(b2); 152 | 153 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/delete.png")); 154 | Image i2 = i1.getImage().getScaledInstance(300, 300, Image.SCALE_DEFAULT); 155 | ImageIcon i3 = new ImageIcon(i2); 156 | JLabel l = new JLabel(i3); 157 | l.setBounds(500, 100, 300, 300); 158 | this.add(l); 159 | } 160 | 161 | public void actionPerformed (ActionEvent ae) { 162 | if (ae.getSource() == b1) { 163 | try { 164 | Conn c = new Conn(); 165 | c.s.executeUpdate("DELETE FROM account WHERE username = '"+username+"'"); 166 | c.s.executeUpdate("DELETE FROM bookHotel WHERE username = '"+username+"'"); 167 | c.s.executeUpdate("DELETE FROM bookPackage WHERE username = '"+username+"'"); 168 | c.s.executeUpdate("DELETE FROM cutomer WHERE username = '"+username+"'"); 169 | 170 | JOptionPane.showMessageDialog(null, "Customer Details Deleted Successfully"); 171 | 172 | System.exit(0); 173 | 174 | } catch (SQLException e) { 175 | e.getMessage(); 176 | } 177 | } else if (ae.getSource() == b2) { 178 | this.setVisible(false); 179 | } 180 | } 181 | 182 | public static void main(String[] args) { 183 | new DeleteCustomer("Anonymous").setVisible(true); 184 | } 185 | } 186 | -------------------------------------------------------------------------------- /src/travel/management/system/BookHotel.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | 10 | public class BookHotel extends JFrame implements ActionListener { 11 | 12 | Choice c1, c2, c3; 13 | JTextField t1, t2; 14 | JLabel l21, l81, l91, l101, l111; 15 | JButton b1, b2, b3; 16 | 17 | BookHotel (String username) { 18 | 19 | this.setBounds(300, 150, 1100, 600); 20 | this.getContentPane().setBackground(Color.WHITE); 21 | this.setLayout(null); 22 | 23 | JLabel l1 = new JLabel("BOOK HOTEL"); 24 | l1.setFont(new Font("Tahoma", Font.BOLD, 24)); 25 | l1.setBounds(100, 0, 300, 30); 26 | this.add(l1); 27 | 28 | JLabel l2 = new JLabel("Username: "); 29 | l2.setBounds(20, 70, 100, 30); 30 | this.add(l2); 31 | 32 | l21 = new JLabel(); 33 | l21.setBounds(250, 70, 150, 30); 34 | this.add(l21); 35 | 36 | JLabel l3 = new JLabel("Select Hotel: "); 37 | l3.setBounds(20, 110, 100, 30); 38 | this.add(l3); 39 | 40 | c1 = new Choice(); 41 | try { 42 | Conn c = new Conn(); 43 | ResultSet rs = c.s.executeQuery("SELECT * FROM hotels"); 44 | while (rs.next()) { 45 | c1.add(rs.getString("name")); 46 | } 47 | 48 | } catch (SQLException e) { 49 | e.getMessage(); 50 | } 51 | c1.setBounds(250, 110, 185, 30); 52 | this.add(c1); 53 | 54 | JLabel l4 = new JLabel("Select Persons: "); 55 | l4.setBounds(20, 150, 100, 30); 56 | this.add(l4); 57 | 58 | t1 = new JTextField(); 59 | t1.setBounds(250, 150, 150, 25); 60 | this.add(t1); 61 | 62 | JLabel l5 = new JLabel("No. of Days: "); 63 | l5.setBounds(20, 190, 100, 30); 64 | this.add(l5); 65 | 66 | t2 = new JTextField("1"); 67 | t2.setBounds(250, 190, 150, 25); 68 | this.add(t2); 69 | 70 | JLabel l6 = new JLabel("AC / Non-AC: "); 71 | l6.setBounds(20, 230, 100, 30); 72 | this.add(l6); 73 | 74 | c2 = new Choice(); 75 | c2.add("Yes"); 76 | c2.add("No"); 77 | c2.setBounds(250, 230, 190, 30); 78 | this.add(c2); 79 | 80 | JLabel l7 = new JLabel("Food Included: "); 81 | l7.setBounds(20, 270, 100, 30); 82 | this.add(l7); 83 | 84 | c3 = new Choice(); 85 | c3.add("Yes"); 86 | c3.add("No"); 87 | c3.setBounds(250, 270, 190, 30); 88 | this.add(c3); 89 | 90 | JLabel l8 = new JLabel("ID: "); 91 | l8.setBounds(20, 310, 100, 30); 92 | this.add(l8); 93 | 94 | l81 = new JLabel(); 95 | l81.setBounds(250, 310, 150, 30); 96 | this.add(l81); 97 | 98 | JLabel l9 = new JLabel("Number: "); 99 | l9.setBounds(20, 350, 100, 30); 100 | this.add(l9); 101 | 102 | l91 = new JLabel(); 103 | l91.setBounds(250, 350, 150, 30); 104 | this.add(l91); 105 | 106 | JLabel l10 = new JLabel("Phone: "); 107 | l10.setBounds(20, 390, 100, 30); 108 | this.add(l10); 109 | 110 | l101 = new JLabel(); 111 | l101.setBounds(250, 390, 150, 30); 112 | this.add(l101); 113 | 114 | JLabel l11 = new JLabel("Total Price: "); 115 | l11.setBounds(20, 430, 100, 30); 116 | this.add(l11); 117 | 118 | l111 = new JLabel(); 119 | l111.setForeground(Color.RED); 120 | l111.setBounds(250, 430, 170, 30); 121 | this.add(l111); 122 | 123 | try { 124 | Conn c = new Conn(); 125 | ResultSet rs = c.s.executeQuery("SELECT * FROM customer WHERE username = '"+username+"'"); 126 | while (rs.next()) { 127 | l21.setText(rs.getString("username")); 128 | l81.setText(rs.getString("id")); 129 | l91.setText(rs.getString("number")); 130 | l101.setText(rs.getString("phone")); 131 | } 132 | 133 | } catch (SQLException e) { 134 | e.getMessage(); 135 | } 136 | 137 | b1 = new JButton("Check Price"); 138 | b1.setBackground(Color.BLUE); 139 | b1.setForeground(Color.WHITE); 140 | b1.setBounds(50, 490, 120, 30); 141 | b1.addActionListener(this); 142 | this.add(b1); 143 | 144 | b2 = new JButton("Book Price"); 145 | b2.setBackground(Color.BLUE); 146 | b2.setForeground(Color.WHITE); 147 | b2.setBounds(200, 490, 120, 30); 148 | b2.addActionListener(this); 149 | this.add(b2); 150 | 151 | b3 = new JButton("Back"); 152 | b3.setBackground(Color.BLUE); 153 | b3.setForeground(Color.WHITE); 154 | b3.setBounds(350, 490, 120, 30); 155 | b3.addActionListener(this); 156 | this.add(b3); 157 | 158 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/book.jpg")); 159 | Image i2 = i1.getImage().getScaledInstance(600, 400, Image.SCALE_DEFAULT); 160 | ImageIcon i3 = new ImageIcon(i2); 161 | JLabel l12 = new JLabel(i3); 162 | l12.setBounds(500, 50, 600, 400); 163 | this.add(l12); 164 | } 165 | 166 | public void actionPerformed (ActionEvent ae) { 167 | if (ae.getSource() == b1) { 168 | try { 169 | Conn c = new Conn(); 170 | ResultSet rs = c.s.executeQuery("SELECT * FROM hotels WHERE name = '"+c1.getSelectedItem()+"'"); 171 | while (rs.next()) { 172 | int cost = Integer.parseInt(rs.getString("cost_per_day")); 173 | int food = Integer.parseInt(rs.getString("food_charges")); 174 | int ac = Integer.parseInt(rs.getString("ac_charges")); 175 | 176 | int persons = Integer.parseInt(t1.getText()); 177 | int days = Integer.parseInt(t2.getText()); 178 | 179 | String acPrice = c2.getSelectedItem(); 180 | String foodPrice = c3.getSelectedItem(); 181 | 182 | if (persons * days > 0) { 183 | int total = 0; 184 | total += acPrice.equals("Yes") ? ac : 0; 185 | total += foodPrice.equals("Yes") ? food : 0; 186 | total += cost; 187 | total = total * persons * days; 188 | l111.setText("Rs. " + ""+total); 189 | } else { 190 | l111.setText("Please Enter a Valid Number"); 191 | } 192 | } 193 | 194 | } catch (SQLException e) { 195 | e.getMessage(); 196 | } 197 | } 198 | else if (ae.getSource() == b2) { 199 | try { 200 | Conn c = new Conn(); 201 | c.s.executeUpdate("INSERT INTO bookHotel VALUES ('"+l21.getText()+"', '"+c1.getSelectedItem()+"'," + 202 | "'"+t1.getText()+"', '"+t2.getText()+"', '"+c2.getSelectedItem()+"', '"+c3.getSelectedItem()+"'," + 203 | "'"+l81.getText()+"', '"+l91.getText()+"', '"+l101.getText()+"', '"+l111.getText()+"')"); 204 | 205 | JOptionPane.showMessageDialog(null, "Hotel Booked Successfully"); 206 | 207 | this.setVisible(false); 208 | 209 | } catch (SQLException e) { 210 | e.getMessage(); 211 | } 212 | } 213 | else if (ae.getSource() == b3) { 214 | this.setVisible(false); 215 | } 216 | } 217 | 218 | public static void main(String[] args) { 219 | new BookHotel("Anonymous").setVisible(true); 220 | } 221 | } 222 | -------------------------------------------------------------------------------- /src/travel/management/system/Dashboard.java: -------------------------------------------------------------------------------- 1 | package travel.management.system; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | 8 | public class Dashboard extends JFrame implements ActionListener { 9 | 10 | JButton b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15; 11 | String username; 12 | 13 | Dashboard (String username) { 14 | 15 | this.username = username; 16 | 17 | this.setExtendedState(JFrame.MAXIMIZED_BOTH); 18 | this.setLayout(null); 19 | 20 | JPanel p1 = new JPanel(); 21 | p1.setLayout(null); 22 | p1.setBounds(0, 0, 1950, 60); 23 | p1.setBackground(new Color(0, 0, 102)); 24 | this.add(p1); 25 | 26 | JLabel l3 = new JLabel("Dashboard"); 27 | l3.setBounds(40, 10, 300, 40); 28 | l3.setFont(new Font("Tahoma", Font.BOLD, 30)); 29 | l3.setForeground(Color.WHITE); 30 | p1.add(l3); 31 | 32 | JPanel p2 = new JPanel(); 33 | p2.setLayout(null); 34 | p2.setBounds(0, 60, 230, 1000); 35 | p2.setBackground(new Color(0, 0, 102)); 36 | this.add(p2); 37 | 38 | b1 = new JButton("Add Personal Details"); 39 | b1.setBackground(new Color(0, 0, 102)); 40 | b1.setForeground(Color.WHITE); 41 | b1.setMargin(new Insets(0, 0, 0, 150)); 42 | b1.setBounds(0, 0, 300, 50); 43 | b1.addActionListener(this); 44 | p2.add(b1); 45 | 46 | b2 = new JButton("Update Personal Details"); 47 | b2.setBackground(new Color(0, 0, 102)); 48 | b2.setForeground(Color.WHITE); 49 | b2.setMargin(new Insets(0, 0, 0, 140)); 50 | b2.setBounds(0, 50, 300, 50); 51 | b2.addActionListener(this); 52 | p2.add(b2); 53 | 54 | b3 = new JButton("View Details"); 55 | b3.setBackground(new Color(0, 0, 102)); 56 | b3.setForeground(Color.WHITE); 57 | b3.setMargin(new Insets(0, 0, 0, 205)); 58 | b3.setBounds(0, 100, 300, 50); 59 | b3.addActionListener(this); 60 | p2.add(b3); 61 | 62 | b4 = new JButton("Delete Personal Details"); 63 | b4.setBackground(new Color(0, 0, 102)); 64 | b4.setForeground(Color.WHITE); 65 | b4.setMargin(new Insets(0, 0, 0, 140)); 66 | b4.setBounds(0, 150, 300, 50); 67 | b4.addActionListener(this); 68 | p2.add(b4); 69 | 70 | b5 = new JButton("Check Package"); 71 | b5.setBackground(new Color(0, 0, 102)); 72 | b5.setForeground(Color.WHITE); 73 | b5.setMargin(new Insets(0, 0, 0, 190)); 74 | b5.setBounds(0, 200, 300, 50); 75 | b5.addActionListener(this); 76 | p2.add(b5); 77 | 78 | b6 = new JButton("Book Package"); 79 | b6.setBackground(new Color(0, 0, 102)); 80 | b6.setForeground(Color.WHITE); 81 | b6.setMargin(new Insets(0, 0, 0, 195)); 82 | b6.setBounds(0, 250, 300, 50); 83 | b6.addActionListener(this); 84 | p2.add(b6); 85 | 86 | b7 = new JButton("View Package"); 87 | b7.setBackground(new Color(0, 0, 102)); 88 | b7.setForeground(Color.WHITE); 89 | b7.setMargin(new Insets(0, 0, 0, 195)); 90 | b7.setBounds(0, 300, 300, 50); 91 | b7.addActionListener(this); 92 | p2.add(b7); 93 | 94 | b8 = new JButton("Check Hotels"); 95 | b8.setBackground(new Color(0, 0, 102)); 96 | b8.setForeground(Color.WHITE); 97 | b8.setMargin(new Insets(0, 0, 0, 200)); 98 | b8.setBounds(0, 350, 300, 50); 99 | b8.addActionListener(this); 100 | p2.add(b8); 101 | 102 | b9 = new JButton("Book Hotel"); 103 | b9.setBackground(new Color(0, 0, 102)); 104 | b9.setForeground(Color.WHITE); 105 | b9.setMargin(new Insets(0, 0, 0, 210)); 106 | b9.setBounds(0, 400, 300, 50); 107 | b9.addActionListener(this); 108 | p2.add(b9); 109 | 110 | b10 = new JButton("View Booked Hotel"); 111 | b10.setBackground(new Color(0, 0, 102)); 112 | b10.setForeground(Color.WHITE); 113 | b10.setMargin(new Insets(0, 0, 0, 170)); 114 | b10.setBounds(0, 450, 300, 50); 115 | b10.addActionListener(this); 116 | p2.add(b10); 117 | 118 | b11 = new JButton("Destinations"); 119 | b11.setBackground(new Color(0, 0, 102)); 120 | b11.setForeground(Color.WHITE); 121 | b11.setMargin(new Insets(0, 0, 0, 200)); 122 | b11.setBounds(0, 500, 300, 50); 123 | b11.addActionListener(this); 124 | p2.add(b11); 125 | 126 | b12 = new JButton("Payment"); 127 | b12.setBackground(new Color(0, 0, 102)); 128 | b12.setForeground(Color.WHITE); 129 | b12.setMargin(new Insets(0, 0, 0, 220)); 130 | b12.setBounds(0, 550, 300, 50); 131 | b12.addActionListener(this); 132 | p2.add(b12); 133 | 134 | b13 = new JButton("Calculator"); 135 | b13.setBackground(new Color(0, 0, 102)); 136 | b13.setForeground(Color.WHITE); 137 | b13.setMargin(new Insets(0, 0, 0, 210)); 138 | b13.setBounds(0, 600, 300, 50); 139 | b13.addActionListener(this); 140 | p2.add(b13); 141 | 142 | b14 = new JButton("Notepad"); 143 | b14.setBackground(new Color(0, 0, 102)); 144 | b14.setForeground(Color.WHITE); 145 | b14.setMargin(new Insets(0, 0, 0, 215)); 146 | b14.setBounds(0, 650, 300, 50); 147 | b14.addActionListener(this); 148 | p2.add(b14); 149 | 150 | b15 = new JButton("About"); 151 | b15.setBackground(new Color(0, 0, 102)); 152 | b15.setForeground(Color.WHITE); 153 | b15.setMargin(new Insets(0, 0, 0, 225)); 154 | b15.setBounds(0, 700, 300, 50); 155 | b15.addActionListener(this); 156 | p2.add(b15); 157 | 158 | ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("travel/management/system/icons/home.jpg")); 159 | Image i2 = i1.getImage().getScaledInstance(1950, 1000,Image.SCALE_DEFAULT); 160 | ImageIcon i3 = new ImageIcon(i2); 161 | JLabel l1 = new JLabel(i3); 162 | l1.setBounds(0, 0, 1950, 1000); 163 | this.add(l1); 164 | 165 | JLabel l4 = new JLabel("Travel and Tourism Management"); 166 | l4.setBounds(500, 60, 1000, 70); 167 | l4.setForeground(Color.BLACK); 168 | l4.setFont(new Font("Tahoma", Font.PLAIN, 55)); 169 | l1.add(l4); 170 | } 171 | 172 | public void actionPerformed (ActionEvent ae) { 173 | if (ae.getSource() == b1) { 174 | new AddCustomer(username).setVisible(true); 175 | } 176 | else if (ae.getSource() == b2) { 177 | new UpdateCustomer(username).setVisible(true); 178 | } 179 | else if (ae.getSource() == b3) { 180 | new ViewCustomer(username).setVisible(true); 181 | } 182 | else if (ae.getSource() == b4) { 183 | new DeleteCustomer(username).setVisible(true); 184 | } 185 | else if (ae.getSource() == b5) { 186 | new CheckPackage().setVisible(true); 187 | } 188 | else if (ae.getSource() == b6) { 189 | new BookPackage(username).setVisible(true); 190 | } 191 | else if (ae.getSource() == b7) { 192 | new ViewPackage(username).setVisible(true); 193 | } 194 | else if (ae.getSource() == b8) { 195 | new CheckHotels().setVisible(true); 196 | } 197 | else if (ae.getSource() == b9) { 198 | new BookHotel(username).setVisible(true); 199 | } 200 | else if (ae.getSource() == b10) { 201 | new ViewBookedHotel(username).setVisible(true); 202 | } 203 | else if (ae.getSource() == b11) { 204 | new Destinations().setVisible(true); 205 | } 206 | else if (ae.getSource() == b12) { 207 | new Payment().setVisible(true); 208 | } 209 | else if (ae.getSource() == b13) { 210 | try { 211 | Runtime.getRuntime().exec("calc.exe"); 212 | } catch (Exception e) { 213 | e.getMessage(); 214 | } 215 | } 216 | else if (ae.getSource() == b14) { 217 | try { 218 | Runtime.getRuntime().exec("notepad.exe"); 219 | } catch (Exception e) { 220 | e.getMessage(); 221 | } 222 | } 223 | else if (ae.getSource() == b15) { 224 | new About().setVisible(true); 225 | } 226 | } 227 | 228 | public static void main(String[] args) { 229 | new Dashboard("Anonymous").setVisible(true); 230 | } 231 | } 232 | -------------------------------------------------------------------------------- /.idea/uiDesigner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | --------------------------------------------------------------------------------