A Comprehensive Guide to Building an Airline Reservation System

Airline Reservation System in Java | Backend Project | Java Project| Unique Coding Project| AccioJob

Estimated read time: 1:20

    Learn to use AI like a Pro

    Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.

    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo
    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo

    Summary

    In this detailed guide, we dive into developing an Airline Reservation System using Java, focusing on both frontend and backend components. The project employs Java Swing for UI development and MySQL for database management, connecting through JDBC. Beginning with the fundamental setup and understanding of libraries in Java, the guide navigates through constructing GUI components, implementing database interactions, and designing an effective system architecture. Itโ€™s an immersive tutorial for budding Java developers looking to enhance their backend skills with practical implementation of GUI and database integration.

      Highlights

      • Creating GUIs using Java Swing to enhance user interaction ๐ŸŽจ
      • Using MySQL for robust data management and storage solutions ๐Ÿ—„๏ธ
      • Learning to integrate JDBC for connecting Java applications with databases ๐Ÿ”—
      • Implementing auto-ID generation to streamline user input and database entries ๐Ÿ”ข
      • Dividing application functionality into modular components for clarity ๐Ÿ“ฆ

      Key Takeaways

      • Understand the importance of libraries in Java to enhance functionality ๐Ÿ› ๏ธ
      • Learn how to use Java Swing for creating graphical user interfaces ๐ŸŽจ
      • Master database integration using JDBC with MySQL ๐Ÿ—„๏ธ
      • Implement auto-generated IDs for effective record management ๐Ÿ”ข
      • Develop CRUD functionality across different components of the application ๐Ÿ“Š
      • Gain insights into connecting frontend and backend seamlessly ๐Ÿ”„

      Overview

      The video offers a comprehensive walkthrough of setting up an airline reservation system. Starting with a discussion on the fundamental technologies like Java Swing for GUI and MySQL for database management, the guide emphasizes understanding these tools as a developerโ€™s strong foundation.

        Further, the guide delves into the practical aspects of developing a Java application, focusing on GUI design with Java Swing. The explanation of Java libraries and components such as JFrame, JTextFields enriches the learning experience, allowing for a deeper understanding of creating interactive user interfaces.

          In the backend section, the integration of MySQL through JDBC for database operations is carefully illustrated. Training on CRUD operations, and implementing features like autogenerated IDs, the tutorial is a treasure trove for anyone keen on mastering Java application development with a focus on real-world projects.

            Chapters

            • 00:00 - 01:01: Video Title The chapter titled 'Video Title' begins with a recap of the previous video, where the project and its functionalities were explained. The focus of this chapter shifts towards discussing the technologies that will be used in the project. There's an emphasis on the importance of understanding these technologies before progressing further, indicating that the chapter will delve into the basics of each technology introduced.
            • 01:01 - 03:06: Introduction to Project and Technologies The chapter provides an introduction to the project, highlighting two major components: the UI, which is also referred to as the GUI (Graphical User Interface). It ensures that readers or viewers have a comfortable understanding of these aspects to follow the project effectively.
            • 03:06 - 05:00: Java Swing Library Introduction The chapter introduces the concept of a GUI (Graphical User Interface) using the Java Swing library. It explains that a GUI consists of elements such as buttons and text fields, which are designed to perform specific functions when interacted with, such as a search button initiating a search operation.
            • 05:00 - 07:00: Understanding Libraries and Properties The chapter titled 'Understanding Libraries and Properties' introduces the concept of graphical user interfaces (GUIs) and their importance in interacting with users. It references the use of Java Swing as a tool for building GUIs, implying the reader's familiarity with this technology. The discussion highlights how GUIs provide a visual way to connect users with the database operations.
            • 07:00 - 11:00: Setting Up Java Swing and NetBeans The chapter focuses on setting up Java Swing and NetBeans for a project. The instructor discusses leveraging the Java Swing library to build the project's front end, assuming the audience already has some knowledge of Java. Before proceeding, a basic introduction to Java Swing is provided, indicating it's essential for the development process.
            • 11:00 - 15:00: Creating the Main Frame The chapter titled 'Creating the Main Frame' discusses a library similar to Java's util library. It highlights the use of the util library in Java, where multiple components such as collection frameworks are utilized using the wildcard operator '*'. The discussion focuses on the integration and use of these libraries within the broader Java programming journey.
            • 15:00 - 19:00: Setting Up the Login Frame In the chapter titled 'Setting Up the Login Frame,' the focus is on utilizing a specific library to enhance functionality. The discussion highlights the use of collections, sorting mechanisms, hashmaps, and linked lists, indicating multiple applications and features that are facilitated by the library in question. Libraries in programming typically provide these features to developers, allowing them to implement more complex operations efficiently.
            • 19:00 - 23:00: Building the Add Customer Frame The chapter begins with an analogy about cooking, explaining that knowing how to cook isn't useful if you lack utensils or ingredients. This idea introduces the necessity of having the right tools and components to effectively perform a taskโ€”much like in building the 'Add Customer' frame for a software application. The chapter likely explores how to gather and use these necessary components effectively.
            • 23:00 - 27:00: Building the Add Flight Frame The chapter 'Building the Add Flight Frame' discusses the importance of utilizing libraries in Java. It emphasizes that Java offers a wide variety of properties and functionalities that are accessible through various libraries. By not using these libraries, you limit your ability to leverage these features effectively. Therefore, the chapter underscores the necessity of incorporating libraries, specifically those under 'util', to fully utilize Java's capabilities.
            • 27:00 - 31:00: Building the Add Admin Frame The chapter delves into the necessity of using the collection framework in Java to effectively manage and utilize data. Just as including the collection framework is essential for managing data collections, the chapter emphasizes the importance of incorporating the Java Swing library in projects to leverage its functionality. This analogy is used to explain the foundational concept of why libraries are integral in programming, especially in setting up graphical user interfaces like an Add Admin Frame.
            • 31:00 - 35:00: Building the Search Customer Feature The chapter focuses on the importance of libraries in Java development. It begins by emphasizing that learning different libraries is crucial for becoming a proficient Java developer, especially in backend development. Despite various implementations and technologies evolving, the core properties of Java remain unchanged. The consistent aspect is the use of diverse libraries that enhance functionality and adaptation in Java applications. This chapter highlights how understanding and utilizing these libraries build a strong foundation for developing features such as the 'Search Customer' feature in Java.
            • 35:00 - 39:00: Building the Book Ticket Feature The chapter discusses the 'Building the Book Ticket Feature' by highlighting differences in syntax and properties encountered. There is an emphasis on transitioning from DSA problem-solving approaches to implementing more complex libraries and features in software projects. The importance of understanding these libraries' roles in software development is also examined, drawing on past project experiences.
            • 39:00 - 43:00: Building the View Ticket Feature In this chapter, the focus is on building the 'View Ticket' feature using the Java Swing library. The Java Swing library provides multiple components such as JFrame, JButton, JPanel, among others. The chapter begins by introducing these components that are essential for UI development in Java Swing. The library is leveraged to create a user interface specifically to enable the 'View Ticket' functionality. As the chapter unfolds, it guides on how these components can be used and integrated to achieve the final goal of the feature.
            • 43:00 - 47:00: Setting Up the Database in MySQL The chapter titled 'Setting Up the Database in MySQL' covers the preliminary steps and tools required to build the front end of a project. It introduces various technologies and tools, emphasizing the use of NetBeans as the integrated development environment (IDE) for the project. The focus is on how these components are utilized in setting up the database effectively.
            • 47:00 - 51:00: Connecting Frontend with Backend using JDBC The chapter introduces the process of integrating frontend applications with backend systems using JDBC (Java Database Connectivity). It begins with a discussion on downloading the latest version of a specific Integrated Development Environment (IDE), essential for building projects. It emphasizes the importance of having the recent IDE version to ensure compatibility and ease of development. The chapter also mentions the requirement of MySQL as the backend database, implying a focus on SQL and JDBC for the backend setup.
            • 51:00 - 55:00: Implementing Customer ID Auto-Incrementation The chapter focuses on implementing customer ID auto-incrementation in MySQL. It is advisable to have a MySQL workbench for better understanding, but using a MySQL server is also an option. The chapter builds on previous sessions and emphasizes a hands-on understanding of SQL through practical projects.
            • 55:00 - 59:00: Adding Customers to the Database This chapter focuses on the preliminary steps of adding customers to a database using SQL. The emphasis is on understanding the project and the basics of SQL required for this task. The chapter specifically mentions the need to install MySQL Workbench as a necessary tool, indicating its role in the database building process. The summary suggests that installing MySQL Workbench is one of the initial steps in setting up the environment for database management, as it is crucial for executing the tasks outlined in the project.
            • 59:00 - 63:00: Adding Flights to the Database The chapter titled 'Adding Flights to the Database' focuses on the preliminary steps of understanding and building the project. The speaker mentions the installation process and assures that documentation will be provided to the respective groups. The crucial next step discussed is to comprehend the project flow, indicating that the project will be built in various segments.
            • 63:00 - 67:00: Adding Admin to the Database In this chapter, the main focus is on adding an admin to the database. Initially, the project is divided into broad segments, starting with the development of a full Airline reservation system.
            • 67:00 - 71:00: Searching for Customers The chapter titled 'Searching for Customers' discusses the process of building a reservation system, breaking it down into two main components: the front end and the back end. The transcript snippet suggests a focus on planning and organizing the different parts of the project before execution.
            • 71:00 - 75:00: Implementing Book Ticket Functionality The chapter titled 'Implementing Book Ticket Functionality' discusses the major role of the database in the project. It highlights the division of categories, focusing on the database and the front end. The chapter also emphasizes the user's experience with the project, showcasing various features like multiple characters and pages, specifically mentioning the 'ADD customer' page.
            • 75:00 - 79:00: Implementing Login Authentication This chapter outlines the various features and functionalities implemented in a system. The main focus is on user authentication and managing various user roles which include adding and searching for customers, flights, and admins, as well as booking features.

            Airline Reservation System in Java | Backend Project | Java Project| Unique Coding Project| AccioJob Transcription

            • 00:00 - 00:30 [Music] so hello uh in the last video we have uh gone through the project uh we have seen what are the different functionality of the project now in this video actually uh we'll uh majorly Focus over what are the Technologies we are going to use and we'll U try to understand the technology a little bit because I think uh before moving forward we should have a basic understanding of the technology then we
            • 00:30 - 01:00 will able to comfortably understand the project yeah so the thing is that uh in our project as as I uh shown to you in the last video we have two uh things that is uh the UI okay which is also known as GUI okay what are these things this is nothing but graphical we refer this as graphical user
            • 01:00 - 01:30 interface okay what is GUI graphical user interface and this is something like uh as I shown you in the last video like we were having some buttons and some uh text field areas and other stuffs which denotes what uh the functionality they are uh processing like if some button was search button so that means if we will click that button then a operation will perform and that
            • 01:30 - 02:00 operation would search something from our database okay so these these kind of Graphics we use okay these kind of Graphics we use to interact with the uh user so this is why we call this as graphical user interface and how to uh build a graphical user interface I hope you guys have worked with Javas swing okay I know you guys have a good
            • 02:00 - 02:30 knowledge of java so that's why we will try to build this project over java itself and there is a library in the Java called Java Swing and we will be using this library to build the front end of our project cool so uh yeah you guys have uh worked with Java Swing earlier but before moving forward I would just give a basic introduction of the Java Swing uh Java Swing is nothing
            • 02:30 - 03:00 but a library a same Library uh similar kind of Library which you guys were using in throughout the journey with the Java that is called um you guys have used Java util okay you you guys have used Java util with this util you have multiple stuff so you always use star okay so what is this this is another kind of library in which you have used multiple collection Frameworks things
            • 03:00 - 03:30 that is U using this Library you have used collection do sort multiple times okay you have used hashmap you have used link list okay and multiple things you have used using this Library similar kind like what what does a library do a library normally U responsible for U getting the features let's
            • 03:30 - 04:00 say it's something like uh you know how to cook you know how to cook okay you know how to cook but what if you don't have any uh like utensil or ingredient uh to cook some food will your ability uh will be justified obviously not because you'll not be able to Showcase your your will not be able to show your
            • 04:00 - 04:30 uh ability of cooking so similar to this Java have a great like a great wide of like wide variety of properties and if we will not use these kind of Library we will not be able to use those property and the functionality because these Library contains those functionality okay that's why whenever you are not using this util library or all the LI libraries under util you're not using that you will not be able to use this
            • 04:30 - 05:00 collection do sort you have to use this collection framework inside the Java then only you will able to use the property of collection framework similar to this whenever we are talking about the Java Swing so we will only able to use the functionality of Javas swing when we are going to in like include this library in our system okay in our program itself so that's what the property of this Library like this was the general discussion about the
            • 05:00 - 05:30 libraries why librar is very important and in Java you have to learn different libraries then only you will be a Java developer like you have heard about the back end and multiple things are there in Java so is anything uh major we change in with the Java no we never change any property of the Java we just use different and different libraries okay and those different libraries has a
            • 05:30 - 06:00 little different syntax and different properties so according to that we are moving forward so in this swing you must have some uh some of different things as you haven't seen in the DSA solving problem like whenever you were solving DSA problem you haven't gone through these things but now you will you had you have seen these things in your uh previous uh projects so I hope I'm I clear to you like how what are are the roles Library plays similar to these
            • 06:00 - 06:30 Library Java Swing is a library now Java Swing have multiple things that is jframe J button okay J button and like J panel and multiple things like this so we will be using these things to
            • 06:30 - 07:00 build our front end okay we'll use these things to build our front end so how we will be going to use these things what which what are the Technologies we are going to use what are the tools we are going to use so that's what I'm here to discuss with you so the tool or the IDE we are going to use that is net beans
            • 07:00 - 07:30 okay this is the uh IDE which we are going to use so I request you all first download the latest version of this Library latest version okay just download the latest version of this IDE um over your uh system then it would be easy for you to build along with me and thereafter uh for the back end we need MySQL okay
            • 07:30 - 08:00 MySQL I would request you to have a MySQL workbench with you if not then no issue you can use MySQL server as well but my if you will have MySQL walk Ben then it would be easy for you to actually Focus over the pro understanding of the project because understanding the SQL you guys have done that uh in the previous uh sessions and some extra sessions which have been given to you like provide to you for
            • 08:00 - 08:30 learning the basics of SQL so right now the focus is over building the project understanding the project so MySQL workbench uh give me a minute workbench yeah so you need to install this MySQL workbench as well these two things we will be using and that's it nothing more you need to install these two uh things you need to
            • 08:30 - 09:00 install and I'll provide you the link uh in the documentation you will receive from like in your respective group that's fine so this is what I was discussing and thereafter the next thing we need to do is to understand the flow of the project okay so we will build this project in that uh some segments in some segments
            • 09:00 - 09:30 so the first segment the first broad like let's divide the project into broad uh uh parts so we have proper Airline uh sorry full Airline reservation sorry reservation
            • 09:30 - 10:00 why my hands are working too fast Reser vation system okay we are going to build this so let's first divide it into two parts the very broad part in which we can divide the project is front end front end and back end okay okay or
            • 10:00 - 10:30 you can say database major part is the database that's why so the like these these two things are the broad division of the category now in this front end as I like you guys have experience like whenever like I just shown to you what are the project and how the project is working so in this we have multiple characters and multiple pages that is ADD customer page
            • 10:30 - 11:00 okay search customer page thereafter we have um add flight page and then we have ADD admin isn't it thereafter we have uh add customer search customer add flight add me book
            • 11:00 - 11:30 flight okay book flight and then we have uh yeah generate ticket and you can add one more thing uh that cancel ticket cancel ticket button you can add or a page you can add where you can cancel the tickets okay so these things we can we need to add we need to build
            • 11:30 - 12:00 these Pages these These are the different pages yeah one more that is login login page and the main page main frame so these are the different uh like now it's been a lengthier one so how many uh Pages we need to build 1 2 3 4 5 6 7 8 and 9 total nine pages are
            • 12:00 - 12:30 there which we are going to build so this is the proper uh flow in the front end now for the back end we need to design uh three database as I had shown to you uh three yeah three or four database that is admin database admin will responsible for logging into the system thereafter the second one the
            • 12:30 - 13:00 flights how many flights what are the flights we have so flight database who are the customer we have so customer database and thereafter at last how many tickets we have booked so ticket database so these are the things we have divided into two parts that is front and back end after building this we just
            • 13:00 - 13:30 need to integrate both of this into a single one integrate these things and we'll be having our final draft final project so I hope the flow is uh fine like we will start with the very basic we have have first divided our project
            • 13:30 - 14:00 into two parts and thereafter we have discussed what are the different things we need to do in front end what are the different things we need to do in the back end and thereafter after all after building these all things we will simply integrate the project and then we will have a final project this is what we need to do I hope that everything is fine so from this second video uh we will start with front front end designing of
            • 14:00 - 14:30 the front end and yeah the first thing we will do we'll start from the main function in last video we have uh discussed about uh what we are going to do like the aand reservation system we have just discussed about the project and therea we have divided the task into front end and the backend thereafter we have like decided that we need to add customer like we need to uh do these we
            • 14:30 - 15:00 need to do these much of operations or things in the frontend and thereafter these are the things we need to do in the back end so the there are multiple thing like uh we will move one by one so first we will complete the front end part then we will move to the back end one so at this point of time uh we have nine things to do so uh we cannot do nine things at a time so we will um go in a fashion that we'll first
            • 15:00 - 15:30 create our main main frame okay main frame as I uhu had shown to you the main frame is the frame where the projects uh all features are visible that means let me show it to you yeah just let me show it to you yeah so let me open the ID then I'll
            • 15:30 - 16:00 show it to you so this is our project and let me open it once
            • 16:00 - 16:30 so this is actually our main function sorry main frame so we will try to build uh create this Frame first thereafter we'll move towards the all other frames so um what are the features we have in this main frame so we have customer add customer
            • 16:30 - 17:00 and search customer just give me a minute yeah so we have multiple features that add customer search customer and flights add flights book flight generate ticket and these are things we have in the main function and with this like whenever I'm hovering to the customer okay like whenever I'm hovering over it so it's like it is having some menu item like this is the menu what we call this top uh bar is called menu bar and
            • 17:00 - 17:30 whatever the content it has that is a different menu like the customer is a menu flights is a menu generate ticket is a menu and add uh admin only is a menu so whenever I am clicking over this so I'm getting these menu items these are called menu items so we are getting these things whenever we are hovering over this so we will try to build this okay now uh I want to show you what thing before moving forward like
            • 17:30 - 18:00 whenever I'm clicking over the add customer or any other stuff so you can see like I will take this but it's not coming out of this uh frame it's going inside it but not coming out of this Frame why because this is not a real frame not a normal frame this this is a normal frame which I can move all the way over the screen but this is not the normal frame this is
            • 18:00 - 18:30 a internal frame which is related to this Frame only uh this internal frame is related to this Frame and why like the way this Frame is uh like working with my particular screen my desktop screen similarly uh this Frame is working same with this particular U screen or back uh whatever the pane we
            • 18:30 - 19:00 have the panel we have like this it's working same like the main frame working in my desktop screen so what is this actually the blue color reason is nothing but a virtual desktop screen okay we have given a desktop pan to our frame and the area which is actually blue is nothing a desktop pan in the uh like that desktop pin gives us a uh real
            • 19:00 - 19:30 screen type stuff in which we can create a internal frame so that's what I have created an internal frame I'll show you how we can do this but for now I just wanted to uh discuss this with you so that you'll have an idea this this is a internal frame and this is a JF frame both of them are having same property in all you can do same stuff in normal
            • 19:30 - 20:00 frame and the internal frame but the difference is like you cannot take it out from the frame okay it would be internal only because I want it to be uh looks real real like project so that's why I'm not taking it out and it would be inside this only so yeah it's a good practice to make a internal frame in a software so that the authentication increases okay yeah I hope this is clear now so first of all
            • 20:00 - 20:30 the main agenda is to create this main frame so before uh like creating this main frame the first thing we need to do is we need to create the uh particular class oh sorry folder because we are starting from the scratch so let's first create a folder and the name of this folder let me give this
            • 20:30 - 21:00 as Airline Airline project okay let skip it here let's go to intelly and I want to create a new project so I'll click over the file okay you have file option so you need to click over the file you will get these kind of option and here you need to
            • 21:00 - 21:30 click uh new project okay project file okay project file and there what you need to choose Java with M okay Java with M and the first is this Java application you need to click Java Maven no need to click this Java with uh gdel you'll have these kind of uh uh like selection like these kind of items you will have but you just need to click over java with MAV and the first
            • 21:30 - 22:00 of them that is Java application and then hit the next one and give the name of your project okay the name of my project is Airline air project you cannot give the space between uh between like space in the name so that's why I have used this hyphen and thereafter you can choose the location Okay so where I have created
            • 22:00 - 22:30 this aine project folder so I want it to put here only so I I put my uh project inside this folder it's fine and let's finish this and after hitting this finish button you will have this Airline project with yourself okay if I would click over here I have the SRC folder then main then Java com my company Airline like I have
            • 22:30 - 23:00 this much of stuff with me so what you need to do just click over this and delete this because we will uh build the project from the way scratch so let's delete this and after deleting this right click over your airline project right click go to this and the first thing is we want to make like I want to create a J frame so click hit over um right click and
            • 23:00 - 23:30 choose J frame then let's give this a main name as main okay because this would be my main frame so that's why I'm giving name as Main and thereafter finish the project and yeah after finishing the after you will hit the Finish button it may happen like you you guys will get this uh at this particular location like
            • 23:30 - 24:00 you you guys may get the uh this padle uh in the uh right side of your uh IDE but I'm having this on the top there's no problem in that so you can choose from where I am choosing uh things over here okay so what is this actually this is my frame okay this is actually my frame which I have just like my uh I'm hovering with my mouse this is the frame
            • 24:00 - 24:30 okay why I have chosen this particular idea because this uh gives you an uh add an advantage that you don't need to write code for everything you can choose things like uh if I want to uh add a button to my frame so I can simply drag and drop from here okay so now in the last projects you may have worked with uh pure code coding and if you wanted to add some button to your uh uh button to your from frame so you have
            • 24:30 - 25:00 to write the code J button new name give the name and then you will have the button so here you don't need to write the code you can simply drag and drop over here and you can do any stuff so let's delete it right for now and like you will ask like we have this Frame but if what if we want to do some customization so here it is like here we have the code okay using these codes you can customize your frame now the thing
            • 25:00 - 25:30 is that this is our frame if I would run my project for now then you will get if I will run this project for now what you will get you will get a blank frame so let's try to run this once uh yeah let me run this so yeah we have getting a frame but the frame is totally blank okay so
            • 25:30 - 26:00 now as we know what what is our Target so we will move towards that and try to achieve our Target so before doing anything the first thing my main uh frame is having that is menu bar okay so the first thing I need to add to my main frame that is menu bar so where is the menu bar so here it is like swing menus
            • 26:00 - 26:30 so here the first thing is menu bar what you need to do just drag here okay after dragging here you will add your menu bar in the frame and you'll have these two options right now file and edit okay what you need to do just click over this you can change the name so the first name I want to give that is customer okay and the second thing I want to do uh
            • 26:30 - 27:00 flights now it like you don't have any U further uh things to rewrite okay so what you can do you can add it simply what you need to do just click over the uh your menu bar and right click here add menu okay when will you will click add menu you'll able to add the new menu and now this menu would be what um
            • 27:00 - 27:30 ticket okay this menu would be ticket there after add menu now this would be equals to admin cool now we have all the required headings of the menu now what I want I want to add menu item as I had shown to you like whenever I was hovering to customer I was getting what the menu item so I want to add that one
            • 27:30 - 28:00 so let's click over this and here you will have ADD from the pallet what I am doing just click over this right click and add from pallet so what I want to add now I want to add menu item so hit this and you will have this menu item kind of thing and I want to addit the text for the menu item let's give this add customer okay I have given add
            • 28:00 - 28:30 customer and again I want to add one more that is search customer search customer and with this uh now it's whenever I will click this I'll have these two options with me similarly I want to add these two option with my uh flight as well so let's go to this like
            • 28:30 - 29:00 add from the pallet go to the menu item yes and choose the name that is ADD flight Okay add flight and again right click over here and again menu item in which I would add book flight
            • 29:00 - 29:30 then we have ticket so we can either we can add one more with this like view ticket view ticket okay and with uh the admin we need to add one here as well that is uh add admin
            • 29:30 - 30:00 and with this now we are done with the menu items where like all the uh things we have added in the menu now as uh I shown to you like if we are having the frame and if I want to add some other frame those frame should be the uh inner frame for that I need to add what desktop pin so for adding the desktop pin you like it's something like a panel
            • 30:00 - 30:30 like see if you're are getting confused in the desktop pain what is desktop pain it's something like the panel like in the panel you can add multiple stuff now like you can add button you can add different different things so desktop pain is s something like that it's a replica it's a virtual or uh yeah you can say it's a virtual desktop screen okay that is what a desktop pin is so if I I will take it here so what is this
            • 30:30 - 31:00 right now I have given a little size of this is a little by default size of the desktop pin so if I would add something here so all the stuff would come into this only and we can increase the size of our desktop pan okay it would behave same like the desktop screen now I have added the desktop screen to my frame now
            • 31:00 - 31:30 it's properly aligned so if I would run my frame now now you'll see it is same like it will work same like uh the main frame we had s yeah so we have the main frame which is like almost same almost it's totally same with my last uh frame like last project which I just just uh uh shown to
            • 31:30 - 32:00 you uh it's same like that now the thing is that we need to create like we are done with the main frame right now now what I want to create let's create a login frame okay let's create a login frame first then we'll move further uh yeah so login would be a frame only login would be a frame okay so let me create the frame and this would be
            • 32:00 - 32:30 login frame okay login frame and finish so it's again a frame okay so I'll uh just discuss the difference between frame and internal frame like I just discuss now like this Frame is independent okay the frame is independent it will appear only once at a time in a project we will able to uh
            • 32:30 - 33:00 like make it visible the frame only once okay we cannot make multiple frame work at the same time and should appear that doesn't look great okay but in a like internal frame we will have the main frame over here and with this the internal frame would only visible inside the frame only but why I'm taking the login uh as a new frame because what I
            • 33:00 - 33:30 want when I will able to log in then only my main frame should be visible okay so that's what the thought is and now let's create the login frame once so what I want I want to make I want to change the color of my frame so what we can do for changing the color you need to right click of for your your frame go to the property okay and
            • 33:30 - 34:00 background you can set the background uh I want it to be something blue blue looks uh nice color so that's why I always tend to use blue so let's check whether it is having the blue color or not run this file no yeah so see the blue color is there
            • 34:00 - 34:30 but that is not the that is the background color as maybe you have uh like witnessed this kind of thing whenever you try to make the background of the frame blue you always uh have the uh frame as white but this the like particular stuff you will see it's something like blue but not proper blue because it's the background color of the frame so uh I don't want this to be so that's
            • 34:30 - 35:00 why we'll again go and check is there something else we can do so this is the background and we can foreground focusable this this this okay if uh like you can have like there are multiple stuff we will able to do those things but what if if you want to code
            • 35:00 - 35:30 the things by yourself like gener uh generate Center these These are the stuffs we have okay let's code by ourself that what I want I want my frame should be of blue color so we will do uh get get content get content pin
            • 35:30 - 36:00 dot set set background set background and we getting some okay get content pan is wrong this
            • 36:00 - 36:30 this dot get content pin okay this is what get content pin dot set background color to Blue okay now uh color to Blue
            • 36:30 - 37:00 so now the color is blue okay if I would run now uh now if I would run this what happen variable blue is not
            • 37:00 - 37:30 okay what I want the color should be blue and we have done this like these things we have done in the minor projects as well so I don't think like you guys will have any confusion with this what I have done like uh if we have this Frame now so whatever the this area is whatever the free area in which we can do the things so that is called a Content pane okay these this area is is nothing but a Content pan so we want it
            • 37:30 - 38:00 to set the background color of that content paint to Blue okay what we want to set this background color of this content paint to Blue so that's what we have done uh let's try to run this once whether uh we have done it correctly or not so let's try to run this
            • 38:00 - 38:30 uh so now you can see my uh this Frame color became blue it's good now with this what I want I want to add a panel okay let's add a panel over here in which I will write I'll give the area and I'll write to add the desktop pane oh sorry username and the
            • 38:30 - 39:00 password so I'll take the label uh label label label label yeah here it is I'll take the label label over here and change it to [Music] username user name and let let's go to the property and change the
            • 39:00 - 39:30 font okay let's change the font I want it to be of it of D italic and bolt all size are larger okay yeah now this looks great so similarly I want to copy
            • 39:30 - 40:00 this sorry yeah I want to paste this and change the text with password yeah looks fine yeah now what I want I want to take the text field
            • 40:00 - 40:30 and let's give some remarkable size and again I'll copy this and paste this a little yeah now it's work uh looks cool and what I want I want want to change the color of this uh panel uh
            • 40:30 - 41:00 pan to like panel to White only it would look great in the white so let's go to the property and the background color is white it's fine it would look cool and what I want I want to give a heading so let's take a panel over here sorry label and change it to login
            • 41:00 - 41:30 welcome to the AC Airways okay AC job Airways okay so let's give this we'll have this property I will change
            • 41:30 - 42:00 the color make it bold and okay yeah now it's looks fine okay just need to do now so we will simply uh make it a little larger so
            • 42:00 - 42:30 that everything should be visible properly and keep it in the middle now now this looks great what I want I want to set the background color of this as well let's check we can give the background color to white now it's fine let's check what are the colors we are how this looks okay uh with this uh we I want to add two buttons as well so
            • 42:30 - 43:00 let's go to the button keep the button over here one button would uh be for login so login login and the other would be for the cancel process like if you want if you don't want to log into the system so yeah add it
            • 43:00 - 43:30 and cancel looks fine so let's keep this in the center should be up over the same space yeah now it's look fine let's try to run this and check how it how does this look and if need some changes we can do that so it's looking something like this okay so it is it's uh seems great but
            • 43:30 - 44:00 this uh black color is not visible over the uh blue so we can change the color let's change the color of this to White and now let's check how does this look
            • 44:00 - 44:30 yeah now it looks fine welcome to the acja Airways now ites it looks fine let me yeah stop running this so what we have done till now uh we have created our main function main frame sorry and then the login frame now what I want I want to access my main frame with this login okay so uh what I what we actually want whenever we'll hit this login button then we should be able to
            • 44:30 - 45:00 log into the system now so there should be some uh functionality added uh we need to add to this login button then we'll be we'll be able to authenticate the user so at this point of time I'm not going to add the authentication I just want to give some functionality to this login login button that is how I'll give the functionality you need to just right click over this and you'll have this like you have this event okay what you need
            • 45:00 - 45:30 to do after going to the event you will have this action and action perform just click over this and you will be directed to a function you will be directed to a function you need to write the code over here what are the things you want when you want when you are hitting the login button you need to write the operation that should be performed when you are hitting this button so what I want whenever I'm uh hitting the login button
            • 45:30 - 46:00 my main frame should be visible and the and the login frame should not visible now so for that what I will do uh this dot set this do set visible uh set visible false make it false and uh like you know uh what we have
            • 46:00 - 46:30 done like this is the main it's a different class okay if I want to call the object of this class what I need to do first I need to make the object of this particular class so main main is equals to new main okay so now we have the object of that class what I want I want my class class main class object should be visible over the
            • 46:30 - 47:00 screen so I'll make set I'll do main do set visible true and that's it so what will happen whenever I will uh hit the login button my main frame should be visible okay let's try to run this once so yeah my login frame is visible let's hit this login button for now and
            • 47:00 - 47:30 after hitting the login button my main frame is visible it's looks cool like it is working fine now and yeah this is cool and one more thing one more thing like I am right now what I doing for running the file I'm hitting the right uh like I'm choosing the file and hitting the right button of my uh Mouse and then I'm am uh going to this what you can do you can still run the
            • 47:30 - 48:00 file with this uh symbol so but if I would run this file uh this particular button hit this particular button my no like I would not be able to run the file I'll get you guys may get this kind of error so what you need to do if you want to run your project using this particular button so just go to your main like this is your main directory main folder go to this folder just right click over this folder
            • 48:00 - 48:30 go to the property and here you'll have this run button and in the main class here the main class just browse it and choose which one is your main so right now what I want I have added that login functionality to the my login frame so I will choose my login frame as the main whenever I will hit this uh button the login frame would come first and then I would would be giving I would be directed towards the main one okay so
            • 48:30 - 49:00 let's select this excuse me excuse me sorry so this is now uh let's try to run this using this button and here we are able to run our project and after login we are getting this Frame Okay so so this is it for this video we'll uh work more and we'll
            • 49:00 - 49:30 uh work with this add customer frame in the next video and add customer add flight and add window we uh add admin we'll try to complete these three things in the last video we have uh completed our main window and the login one as well we have completed both of this now our Target for this video is is to create the add customer add flight
            • 49:30 - 50:00 and admin only window and if we will able to uh complete both all of them then then it would be great otherwise we will uh try to complete at least two of them so yeah let's get started with the things yeah so what you need to do just right click over this new and go to J from no now we are not going to do that what I uh have discussed with you
            • 50:00 - 50:30 like this is our main window okay this is our main window we had discussed about this this is our main window what I want whenever I'm clicking over the add customer the add customer window should come inside this Frame only like this is my desktop pin only okay so this is my desktop pan and if I'm clicking over this add custom customer then my ADD customer should not
            • 50:30 - 51:00 be a frame that should come in this Frame only so for that we're not going to create any what we are not going to uh create a frame this time we'll create a internal frame okay so for those who will not get this uh like option over here what you need to do just go to the others and here just write J internal frame okay internal frame and U most of
            • 51:00 - 51:30 you will get the suggested one this J internal frame what you need to do you just need to select this and next okay then you will able to create the J internal frame right now I'm getting the uh this option over here so I'm just choosing this J internal from J internal form actually and yeah so let me give the name as add
            • 51:30 - 52:00 customer okay uh this is ADD customer window and yeah finishing this and completed now you will see we are getting the same structure like same like this Frame frame is also same as internal frame as I had told you it is working same but the thing is that it always comes under the frame only okay you will not be able to use this same
            • 52:00 - 52:30 like frame but yeah the properties are almost same so in this video uh we will be creating our uh add customer window so for the add customer window let's give a label to this so what I have done I have added a button over here for the pallet so that I will have a wider area to design my uh system design my uh like pages so what you can
            • 52:30 - 53:00 do to add this button just uh click over this right click this okay like here what I have done I have removed that so you will if you will right click over this now this bar Type S uh This Bar you'll right click over this show add button and here you will have this add button now so this is what you need to do and now we'll have swing containers like panel and everything swing controls like all
            • 53:00 - 53:30 the things you have in your pallet you will able to get the get this over here okay now the first thing I want I want a uh pen uh label so let's get a label over here and let's use this and addit this as
            • 53:30 - 54:00 welcome to the customer panel okay welcome to the customer panel or you can change whatever the message you want to display as an heading so it's up to you you can customize this I want to make it a little bigger uh of this font you can change it
            • 54:00 - 54:30 according to you let's SK let's bold this and off little bigger size and yeah seems correct now uh what I want similarly uh as we done in the last one last session uh what I want I want to color this in
            • 54:30 - 55:00 the black sorry blue uh so just go to the source code and here what we need to do uh this dot Set uh sorry this dot get content same same whatever you are you were doing with the uh frame now it is working uh it works same like that so this do get content pain dot
            • 55:00 - 55:30 set background dot set background color to uh set background color to Blue okay and now so this do get content print set
            • 55:30 - 56:00 background color to Blue and we have uh set the background color to Blue now I want to change the color of my uh text to White and I have changed the color of my text to the white and let's keep this in the middle looks fine and now what I want I want a panel
            • 56:00 - 56:30 let's take a panel over here and in this I'll expand this panel like this and in this panel I want to add the controls like first of all uh J panel
            • 56:30 - 57:00 sorry label I'll use this label and added this with customer ID and this customer ID what I want this customer ID should be as I had uh shown you now like whenever we are uh opening any customer add customer panel the customer ID is automatically generated so that we will implement it later but right now just
            • 57:00 - 57:30 focus over the front end part so that's why I'm completing this and yeah first of all I want to give the color to My Pan uh panel the panel color would be background color should be blue that looks pretty fine so background color I have changed now what I want uh the color of my text that should be
            • 57:30 - 58:00 white and yeah uh let's change the font as well so it should be in the de NRI and bold but the size would be little smaller let's keep this 18 yeah this looks fine so customer ID and for the customer
            • 58:00 - 58:30 ID uh I will have the text field so let's go to the text field here I need to put the text field yeah now it looks fine let's copy this copy and create some
            • 58:30 - 59:00 duplicates first name copy this last
            • 59:00 - 59:30 name and uh with the last name I want the passport number with this
            • 59:30 - 60:00 with passport number uh I want to be ni I ID ni ID is normally national ID so we can give this national ID and let's keep one more copy for
            • 60:00 - 60:30 [Music] address okay now let's align them properly
            • 60:30 - 61:00 looks fine uh now let's copy this paste this
            • 61:00 - 61:30 now for this we will get because see all the things would come in this much of text field but for the address address are uh quite big so for that we'll take a uh we'll take this text a area which is quite
            • 61:30 - 62:00 big yeah now looks fine so this is customer ID uh first name last name passport ID Nic ID and the address looks good thereafter uh we will create one more stuff here that is one more panel I need uh
            • 62:00 - 62:30 for that yeah now this panel is for like gender contact uh and date of birth so yeah we need those information as well so make it blue first the background should be
            • 62:30 - 63:00 blue and with this let me create one copy of this for the contact contact
            • 63:00 - 63:30 now uh one more copy of this for gender now for gender what I want I want to give the radio buttons okay so radio button is
            • 63:30 - 64:00 here let me addit this uh this should be for male and the color should be white similarly what I want I want a copy of this for female
            • 64:00 - 64:30 looks nice and the last one is for date of birth so let's take uh uh J first of all the label this is again a label so let me delete this we'll take a copy of this copy paste
            • 64:30 - 65:00 date of birth okay date of birth and let me keep this a little small H and here we need to add like we want to choose the date so for that we will
            • 65:00 - 65:30 use date J date Chooser and I will show you how you can choose uh get this you'll not have this J date Chooser in your respective uh pallet you have to add that so for adding the date J do date Chooser I'll show you just in a minute for first of all let me add the button so that we'll able to complete
            • 65:30 - 66:00 this yeah we have this button the name of this button would be add and one should be the delete button and what I want yeah it's looks fine let me keep them aligned yeah now
            • 66:00 - 66:30 looks fine let's try to run this and check it how will this look for running this what I will do I'll firstly add this class into uh with the main class what I want uh one one more thing I want to do like this is a frame I'll click over this and go to the property of this Frame what I want I want I should have a closer property whenever CL uh click a cross like right now we don't have any
            • 66:30 - 67:00 cross button over here I want to add so here is the closable you just need to click this and close so now you'll have a closable option over here that looks pretty fine and it's a very useful thing so first of all we'll go to the main one click our customer add customer right click over the add customer go to event action action perform okay now you will have a function what I want when
            • 67:00 - 67:30 whenever I will click that add action then my ADD customer panel uh like frame should be prompted and should open so for that first of all I will create the object of that so add customer add customer uh customer equals to new
            • 67:30 - 68:00 add customer okay we have created the add customer uh object now uh let me add uh what soever the name of this desktop so let me change the name to Simply
            • 68:00 - 68:30 dextop okay so as as as I told you now this is a desktop type of thing so we need to add our internal frame in over this desktop only so that's why so we'll add dextop do add what customer okay let me give this
            • 68:30 - 69:00 customer and yeah so we have added that into the custom uh into the desktop now what I want I want it to make this set visible true for the customer internal frame so set visible true yeah set visible true now I have added that into the frame let's check uh let's
            • 69:00 - 69:30 run the project as I had like told you know how you can run the project you with this button you need to go to the property and go to the run you need to choose the file so click okay and you need to just run this and it's
            • 69:30 - 70:00 running so yeah we are able to see this so username password and let's log in we have this over here click add customer and yeah it is visible and you can see we will not be able to take it out from this uh frame and if you want to extend the frame you can do that and welcome to the customer panel and this is this
            • 70:00 - 70:30 looks fine like great it's look great like you have this option like in the address you you can give as long as you want to give the address so you can give and we have ADD button we have delete button we have not uh added any functionality to this that's why this looks like this and yeah this is what our ad
            • 70:30 - 71:00 customer panel will look like and it looks quite good now let's let's create one more uh page for the add flight so let's make a class add flight Okay so we have created a add flight same like add
            • 71:00 - 71:30 customer what we can do even even what we can do let's delete this one delete okay now what I will do let's create the copy of this copy and paste the name would be and flight okay and
            • 71:30 - 72:00 refractor now we will have the copy of this copy of uh add customer we will go to the design and everything is there we just need to change few things uh this is not customer panel this is flight okay this one is flight and we don't want customer ID we want flight
            • 72:00 - 72:30 ID flight ID and we don't want first name like flight does not have any first name we want just name flight name okay and it will have the arrival arrival and
            • 72:30 - 73:00 departure and duration we'll have duration and here we can uh we can delete this because flight does not have any address so we can delete this uh yeah we can reduce
            • 73:00 - 73:30 this it looks fine and for the contact we don't want any contct uh we can change this with the uh seats how many seats this flight will have and we don't want any gender so we have flight ID flight name arrival departure duration we can change it to
            • 73:30 - 74:00 Fair uh spere and we can delete this instead of this we can uh copy this paste this over here and yeah this looks
            • 74:00 - 74:30 fine now we don't want date of birth we want date okay for which date you have added the flight so flight data FL now this looks fine
            • 74:30 - 75:00 cool so let me align this with everything everything is aligned and we have this add button and the delete button so we can keep this a little up we can reduce the panel size and this looks fine now
            • 75:00 - 75:30 okay so what we need to do again go to the main window okay main window and here at the point of like here add flight just right click event action action perform and you have this function you need to implement the like functionality of this add fun add uh like add flight button here only so
            • 75:30 - 76:00 what I will do again create an object of add flight add flight so this would be the flight equals to new flight new add flight wait add flight and yeah we have created the object of AD flight thereafter uh we need to add
            • 76:00 - 76:30 this to the desktop same like the previous one do add what I want to add I want to add flight and make this visible so flight dot set visible true yeah looks fine now we can check it
            • 76:30 - 77:00 once how does this look yeah this is the first page first login customer add customer was fine now flight so whenever I am clicking over add flight welcome to the flight panel flight ID flight name arrival departure duration seats fair and date of flight looks totally fine
            • 77:00 - 77:30 okay so yeah this was the add flight button oh sorry add flight panel now we can move in the last video we have dis like we have finished add customer and uh add flight now the agenda for this session is to complete the add add admin and and the search customer uh frame so let's get started
            • 77:30 - 78:00 and let's try start building the add admin okay so for add admin let's again I want to make a internal frame J internal frame and add uh admin okay so this is ADD admin s uh frame in this what are the things we need to uh create an admin so the things
            • 78:00 - 78:30 are the name of the admin like name and yes the name username and the password that's it these three things are U necessary for the admin so we will do that so uh for that let's first create uh use our label okay just put it over here and change it
            • 78:30 - 79:00 to Welcome to the admin panel okay welcome to the admin panel and let's give the color uh the color should be white as we are doing with the with all of the frame and
            • 79:00 - 79:30 the font should be of ITF Dev nagri and let's give this as 24 or 36 should be bold and now this looks perfect keep it in the middle yeah now this looks perfect uh with this uh we want to color it in blue
            • 79:30 - 80:00 so uh this dot set sorry this dot get content pin okay get content pin dot set background color to color dot blue okay we need to import the class and yeah now it's
            • 80:00 - 80:30 fine so this would become blue and the text is in the white color now thereafter I need to like I want to get the full name so but before that I want a panel not label so let's take a panel so this would be my
            • 80:30 - 81:00 panel using this panel I'll get the username let's keep this in the middle seems correct or wrong now it seems perfect yeah so with this uh what I want I want to change the color of the my panel
            • 81:00 - 81:30 to Blue yeah perfect and here I want to add the label so let's go to the label where it is yeah this is name okay the first
            • 81:30 - 82:00 name and what I want I want to change the font as well let's change the font same 18 and 24 yeah this looks fine let's change the color as well so the foreground color would be white
            • 82:00 - 82:30 yeah looks fine let's make a copy of this last name okay and one more thing I want that
            • 82:30 - 83:00 is the use like obviously admin ID would be there now for for all the admins I want a separate ID so that's why admin ID and give the text field text field for admin
            • 83:00 - 83:30 ID now this perfect let's copy this paste it over here let me give a little longer length so that the name should we we
            • 83:30 - 84:00 will able to display the name properly yeah now it looks fine uh let's give uh two more fields for giving the username and password so we can copy this and paste this over here this would be my user
            • 84:00 - 84:30 name and similarly copying this password
            • 84:30 - 85:00 looks fine let's copy this and base over here
            • 85:00 - 85:30 yeah looks
            • 85:30 - 86:00 fine yeah so we have added all the required field that admin ID uh first name last name username and password okay now the time is to give the buttons so we can choose the button put it over here that add or we'll choose a
            • 86:00 - 86:30 button so that we can cancel the operation yeah looks nice and let's go to the main to add this class uh let's go to design admin add admin just this is the add admin so what we can do we need to First create
            • 86:30 - 87:00 an admin object admin equals to new admin okay now we'll add this to desktop do do add admin and now admin.
            • 87:00 - 87:30 set visible true looks fine okay so we can check it by we can run once so this is our software let's log in this is the main window click over the
            • 87:30 - 88:00 admin and we have this admin panel but we have not given this uh cancel button uh did we have yeah we have given we have not given the cancel button so let's go and give that as well add admin and let's select this right click property go to to the closable and give this here now we have this closable property
            • 88:00 - 88:30 as well so we have we are done with the ad admin class now the thing is that I want to make a uh search customer class so for making a search customer class there's no need to do like any uh further work what we can do we can click over the customer okay we can click over the customer copy this and paste this over here and the name would be
            • 88:30 - 89:00 search customer okay and reflect over here and we have the search customer class go to the design here I don't want to add this buttons over here I'll take it uh go to the design I'll take this button over here only and rename this with
            • 89:00 - 89:30 search okay and don't need to write this as well that's it this would be uh search panel this is search panel so we'll write this as search search panel looks cool so yeah with this we are able to
            • 89:30 - 90:00 complete our ad admin and the search panel so in the next session we just left with what we have completed add customer search customer flight add flight we are done we we need to build last two things that is book flight and the view ticket thereafter we are done with our front end and we will move towards the back end and we'll learn how actually the back end works so there is
            • 90:00 - 90:30 one more video after this in which we will be discussing about the uh back in okay so yeah we'll uh meet in the next video thank you till the last video we have completed admin panel uh customer add flight login and Mainframe and with that we have completed search customer as well and
            • 90:30 - 91:00 with this we have added all of this in the main class as well so the agenda for this session is to create the book flight panel and thereafter if we will have some time then we will uh complete the uh get ticket or book ticket uh panel as well so let's get started okay I hope till this point you are getting all of the things if you are not getting
            • 91:00 - 91:30 the things you can join the uh live. session uh which is scheduled for from 5: to 7:00 and in the uh night from 11 to 1 to resolve your queries okay so let's get started and what you need to do just right click of over this go so now the book ticket is uh same as would be the same as the other frames we are creating that is the frames we are creating is uh J internal frame so we'll
            • 91:30 - 92:00 uh rename this with book ticket okay book ticket frame and just hit enter and we'll have this internal frame let's expand this a little after expanding this now if I will run this once let me run the last
            • 92:00 - 92:30 one uh yeah this this [Music] one if I would run this project now uh let me just log to this uh P 308 and password is 1 2 3 4 5
            • 92:30 - 93:00 login okay if I would hit this login I would able to log in into the system what happened okay my database is not started right now so let me on this Capital P3 8 s so now database started let me hit
            • 93:00 - 93:30 enter again and after hitting the enter now I'm able to enter into my system so what I want see here with the flight I have book flight option and uh like what I want my book ticket should look like uh something this like whenever I will uh choose one of this and one of this then I'll hit the search button and I'll I would able to get the flights over
            • 93:30 - 94:00 this table and this is what we were doing like from Delhi to Goa I if I will search then I'm getting some flight and after hitting this over this flight I'm getting the fair as well okay I'm getting the fair and then this is the C customer ID they are asking for the customer ID so we will give the customer ID and then search the the particular customer and I want there this is uh ticket ID uh like you are getting the by
            • 94:00 - 94:30 default ticket ID this is something called J label so we will try to build this panel uh in this way so let's get started and try to build this once so let me just remove this and go to this panel yeah now the first thing is I will would uh like I want to make that uh search panel where we were uh giving the uh arrival and departure so
            • 94:30 - 95:00 we will first add the panel okay put the panel over here just keep it a little lower um just keep it a little lower because I want to give a heading that you are in the ticket booking section so that's what I was looking for now this looks fine in this I would uh
            • 95:00 - 95:30 put uh first of all uh J label okay I'll put J label uh arrival arrival and let me just go to the property uh make it bold of same kind
            • 95:30 - 96:00 of text it should be 18 not more than this and I want to change the color as well the color should be white so I have changed the color to the white and let's change the color of this panel as well to the blue because our basic color is blue for this project so I have changed the color to the blue and let me copy
            • 96:00 - 96:30 this for the departure as well so this would be for departure looks nice and uh I want to have one more which will give me the message to search
            • 96:30 - 97:00 here search your flights okay we'll search we'll give the message like search your flights according to arrival and departure now the thing is that you have seen one thing um I was not having any text field over here okay there were some sliders or
            • 97:00 - 97:30 some drop down option so we will choose this control and go to the combo box okay the combo box was the thing so I'll click this and take it over here and just keep it in the middle yeah just copy it and put it over here as well let's not copy this over right now because uh we have to do the stuff
            • 97:30 - 98:00 with both of the drop down now let's go to the customize code okay now what I need to do see right now you don't have any options over the here that is customized like there are item one item item item one item two item three and item four only four things were there in this drop down and those are named as item one item two item three item four what I want I want to customize this to
            • 98:00 - 98:30 uh to what I want okay so let's change this and for that we need to go to the customize code okay you need to go to the customize code and here let's change this to uh [Music] let's change this to customize code customize property
            • 98:30 - 99:00 and Delhi uh Kolkata all the Met cities I am giving right now chenai Mumbai
            • 99:00 - 99:30 and do I I need to give one more Delhi Kolkata Chennai Mumbai Bangalore okay now looks fine let's hit enter and I will now copy this and paste this over here now
            • 99:30 - 100:00 whatever the changes we had we have done in the this one that would be visible and uh visible over here as well so now the next uh next task is to uh have a button so let's take a button over here and put it over here edit uh search the name of the button would be
            • 100:00 - 100:30 search yeah looks fine great so after hitting the search button we'll able to search for which of like those flight who have like those flight which have arrival and departure as same we have chosen okay now there thereafter I want a table so let's go to the do we have the table option over here no we don't have let's go to the
            • 100:30 - 101:00 menu no yeah in the menu we have the table so we'll take that table over here and I don't want it to be too large because we don't want a large table so yeah I want a smaller table because table doesn't have a lot of flights because we are not going to add if we will add then we can um change the size
            • 101:00 - 101:30 of this Frame or we can add page one and page two in the table itself but for now uh let's keep the table size a little smaller itself looks fine looks good hm now thereafter what I want let's create an label let's create a label over
            • 101:30 - 102:00 here uh this is book The Dream flight ticket ticket for you book The Dream flight ticket for you like we are a good company so that's why we are giving this kind of
            • 102:00 - 102:30 message and let's change the color to the white and let skip the property to change this to da agree yeah italic bolt and this should be a little longer
            • 102:30 - 103:00 size yeah yeah so what I have done I have done like I have changed the font over here now um I guess looks everything looks fine now let me give the proper size [Music]
            • 103:00 - 103:30 yeah looks nice and with this let's keep one more thing the J label for uh ID okay ticket ID
            • 103:30 - 104:00 and keep this off white as well so let's give this white color and yeah I think this looks fine because we don't want it to like ticket ID should be visible in a large very large frame so this looks fine and let's do one more thing uh give the color of the frame to Blue so for that this dot
            • 104:00 - 104:30 get content get content pane dot uh set background color to color color dot blue and yeah now import this class
            • 104:30 - 105:00 looks fine design everything is going good we have this now let's take one more thing that is g label itself put it along this and this would be uh I ID and let's keep this a in a different color so that this should be
            • 105:00 - 105:30 visible all over so let's go to the property and change the color to Red okay change the color to red and it should be again of the same font yeah now it looks nice and thereafter the next ask is to have different
            • 105:30 - 106:00 panel for all those operations in which we will search the customer and get all the details and here we'll put the button for booking okay so let's go and take the J panel first okay so before that let me give the color to
            • 106:00 - 106:30 Blue for this panel as well not this one cancel this go to this give it blue yeah now it looks nice before anything let me go to the property change the diff ground color to white looks nice and now add it uh
            • 106:30 - 107:00 customer customer ID let's change the font do they now here customer ID and let me copy this
            • 107:00 - 107:30 what are detail actually we need for booking a customer's ticket first the customer ID the second thing is customer name first name and last name first name
            • 107:30 - 108:00 last name and contact and I guess this is what what actually we need from a
            • 108:00 - 108:30 customer H customer ID first name last name contact and this is it gender and that's it thereafter uh we can have have we can ask for the
            • 108:30 - 109:00 fair we can ask for total tickets we can ask for for now total
            • 109:00 - 109:30 Fair uh yeah total fair and we can have option for Discount as well we can give a discount Factor as well so discount and that's it now let's take the text
            • 109:30 - 110:00 fields and yeah this is the text field let's keep it over here let's keep it over here let's resize this a little yeah now looks fine so copy this paste
            • 110:00 - 110:30 this and put it here again copy it again same let's go back sorry don't want a bigger one that looks
            • 110:30 - 111:00 nice what just take it put it over here again paste take the next put it here paste take the next put it over here again take next put it over here same kind of stuff we need to do
            • 111:00 - 111:30 multiple times no yeah looks nice yeah now everything looks nice aligned and everything is fine just take a
            • 111:30 - 112:00 button take a button put it over here move the sign write search because we want to search the customer so yeah therea total fair and I want to put a but and for total Fair as well and we can give the name
            • 112:00 - 112:30 as calculate Fair okay looks nice and at last let's keep this a little closer
            • 112:30 - 113:00 and H now looks nice and let's add two button now that is for booking book and one more more button for
            • 113:00 - 113:30 cancel both looks nice let me check whether we are in the middle or not keep this in the middle as well now everything looks nice let's try to run this once before running this let me go to the main one and we need to add this because we have we are done with
            • 113:30 - 114:00 this as well so let's go to this no here uh let's go to the design click over the flight book flight right click event action action perform and in this function we need to create one variable of book ticket book ticket new
            • 114:00 - 114:30 ticket equals to new book ticket okay now new ticket first of all we need to add it into the desktop desktop. add and new
            • 114:30 - 115:00 ticket and desktop. add new ticket and and and and yeah new ticket. add sorry set visible true
            • 115:00 - 115:30 true and we are done with this let me run this once so yeah we have this main function main frame book frame so yeah book frame is visible properly book The Dream flight ticket for you
            • 115:30 - 116:00 ticket ticket ID if you will drop click over this drop down Delhi Kolkata Chennai Mumbai Bangalore okay so we have these things and the search button this search button calculate Fair book cancel so looks pretty nice okay say okay one thing we left that is the cancel one so let's go to book ticket and
            • 116:00 - 116:30 property uh choose this Clos yeah now it's fine so looks nice this looks nice now the next task is to create the ticket one so without wasting the time let's go to the new internal J frame and make the uh like name this get ticket get ticket and yes this is the
            • 116:30 - 117:00 get ticket frame so keep this in a ticket format that's why I'm uh making this as a rectangular one and yeah so the first thing I want to color this with blue so this dot get content pane the third
            • 117:00 - 117:30 one dot set background color dot blue and we need to import that as well here let's go to the design now this is blue so with this what I want uh I will like what are the details I'm getting from a customer while booking the flight like
            • 117:30 - 118:00 like this here I getting the first name last name Conta and gender that should be visible at least and and thereafter I want to display arrival and departure as well so these these things should be there okay so let's go to the get ticket class one more more thing should be there the ticket ID we would ask for Ticket ID and then we will generate the ticket so for
            • 118:00 - 118:30 that we will simply take it and yeah have a label over here ticket ID this should be of white
            • 118:30 - 119:00 color and D nag bold and at least of this size with this I want one text field as well so text field over here which is now right now
            • 119:00 - 119:30 empty and with this I want a button because I'll hit the search button get get ticket the get ticket button and there after we will generate a ticket down there so for that I would get one
            • 119:30 - 120:00 panel and the panel will be here looks nice and here I would have first one label the label should be here thanks for
            • 120:00 - 120:30 choosing a job Airline okay and skip this white again change it to this tallic bold at least 28 yeah
            • 120:30 - 121:00 sorry 18 and looks nice looks great even and what I want take it keep this in the middle keep this in the middle as well now we have have this much of space and here we need to just uh put some labels that
            • 121:00 - 121:30 is name sorry first name first name and this should be a little bigger because we have a lot of space and we just need to put a little thing
            • 121:30 - 122:00 so first name copy paste last name okay and first name last name
            • 122:00 - 122:30 and gender should be visible over here and thereafter again I'll copy this I will take and write arrival here and again paste
            • 122:30 - 123:00 this and change with this with departure keep this align and with this I'll write the contact
            • 123:00 - 123:30 number and one more thing we we will need with this that is flight name
            • 123:30 - 124:00 and that's it h and if you want to put any image over here you can put that as well and I don't want it to be of a longer length
            • 124:00 - 124:30 H now uh let's put some text field for
            • 124:30 - 125:00 getting all these details uh we will not get this text field we will use the uh J label as well because this would be a ticket and we don't want anyone to change these things so that's why it should not be a tech uh editable stuffs so again I will choose white
            • 125:00 - 125:30 color and with this white color we will get things of the same size copy this copy paste take it over
            • 125:30 - 126:00 here H looks nice keep it over here
            • 126:00 - 126:30 again H now this looks nice and with this yeah we are done with uh
            • 126:30 - 127:00 our get ticket method where will will getting the tickets on the basis of the ticket ID and this uh looks nice I guess if you want to make any changes you can do that you like we will be welcoming you for for um your efforts and if you will have any doubt for while uh working with your project and doing
            • 127:00 - 127:30 your own stuff you have your doubt session and you can ask there okay so let's add this into our main function that is ticket view ticket click over view ticket event action action perform and here just we need to Cate create the uh object of get ticket
            • 127:30 - 128:00 ticket equals to new get ticket thereafter add this to the uh into the desktop desktop. add what ticket and ticket dot get sorry ticket do set
            • 128:00 - 128:30 visible true looks nice let's try to run this H we have done a lot of stuff till this point let's go to the ticket view ticket and this looks nice let's change the color of my get ticket
            • 128:30 - 129:00 method and change this to Blue and one more stuff I want to add the closable property now this looks nice and run this
            • 129:00 - 129:30 once so get ticket view ticket and yeah we have this ticket ID we'll write the ticket ID after hitting this thanks for choosing a job Airline we'll get the first name last name gender arrival departure and contact number all the things we will able to get get and how we'll able to get we will uh learn these things in the further video and from the next video we will start understanding the actual
            • 129:30 - 130:00 backend implementation uh for till this point I have gone maybe too fast because you guys have done these things in your U minor project that's why I was not uh like forcing you to uh like making you more un like like explaining these all things because you know these things earlier so it's good to go with the flow when you know the things but uh like now
            • 130:00 - 130:30 from now onwards you will have a less idea of whatever we are going to do so everything I would explain from the basics and just um watch the video and if you have any doubt you can just join the doubt session and ask your queries okay in the last video I had just discussed about how actually actually uh like what is the importance of data structuring like how you are creating your database so how this is important to in this video what we are going to do
            • 130:30 - 131:00 we will be creating the database now for that I had told you in the last video that you should have the uh MySQL workbench with you this is how this is what a MySQL workbench look like whenever you will open the workbench you'll see uh you will have this kind of uh like uh UI you have to click over one of there would be one database or the Local Host server there you'll be uh directed to this this
            • 131:00 - 131:30 kind of thing you will be directed to this kind of thing okay so what you need to do over here like let's first discuss which database we are going to create right now uh in this as we had discussed in the last uh video we want to create a database so what you can do here is the database kind of symbol which I had created a symbol like uh in the last video so this
            • 131:30 - 132:00 is the database uh symbol you can click over here and you will have schema editor okay we call schema and database um database is equals to schema okay so now let's give the uh database name that is Airline Airline project okay and hit this apply button apply and we are done with the
            • 132:00 - 132:30 creation of database Airline project now you need to click over this schema refresh this and check do you have that Airline project yes we have this Airline project over here right now I have multiple database that's why it's uh quite difficult to recognize this Airline project so here is the database now uh let's create and in this database what I want I want to create the tables okay what
            • 132:30 - 133:00 are the tables I want to create I want to create admin table customer table flight table okay flight table and ticket table sorry for the writing I know my writing is very bad so you can forgive me for that and yeah so first of all let's create create the customer table or you can create an admin let's create the customer table first so what are the things we are uh asking from a
            • 133:00 - 133:30 user the first thing we are giving to the user that is customer ID so customer ID is very important so we need this customer ID for my database first name third last name then fourth passport number okay passport number the fifth
            • 133:30 - 134:00 one is national ID we are asking for the national ID then sixth one is for what address isn't it now thereafter few more data we require that is uh the contact contact number so this was the sth one then eighth one was gender and one is as well the date of birth do okay so these are the fields uh data
            • 134:00 - 134:30 we are asking from the user we required these data from a user or from a customer so for this particular thing we need nine columns in our table nine columns actually sorry we need nine columns 1 2 3 4 5 6 7 8 and N nine columns we want in which we will fill the data so for that let's move towards
            • 134:30 - 135:00 my workbench click over here you need to right click over the tables create table and here it is here you need to give the name so name of the table is customer okay now here the customer table here you can give the call column and the type of data you want to store so first uh column would be customer ID you don't need to give any
            • 135:00 - 135:30 space between the column name okay you'll not be able to uh access the table prop or column that properly so that's why you have to uh remove all the spaces between anything you are any name you are using for the columns so this would be customer ID and what I want this should be of warar what is this warar actually let me explain this so uh let's take this 20 let's take this of five size okay
            • 135:30 - 136:00 what does this mean actually uh same like in Java you in Java you have string okay and string Builder is also there string Builder Okay string Builder using the string Builder you can uh change the string at any point of time this is the facility of string Builder similarly
            • 136:00 - 136:30 this warar means warar is nothing but it uh it compies U like it is a composition of two words that is variable character okay that means you can use uh as much as long character you can uh make character uh word or statement that is uh if I have given I
            • 136:30 - 137:00 have write warar warar five that means I will have five size of string okay that means one uh 0 0 0 0 0 this much of size string would be accepted by this not more than this so we have given the size and and we have selected the variable character size as five and this would be a character kind of or this would be a string kind of thing in which we will
            • 137:00 - 137:30 have five character that's why we call it warar and this is a data type of SQL okay so this is what the warar is now customer ID is here now this is this is a primary key as we had discussed now like there should be a particular uh thing in the table which will denote a particular data so my customer ID would denote the uniqueness of every
            • 137:30 - 138:00 data like for every uh row I would have a separate customer ID okay I would have a separate C uh customer ID that's why it's a primary key and this should not be null and this whenever we have a primary key in the table that primary key cannot be uh we can cannot make a primary key duplicate so if I have given some let's say the customer ID customer ID in my table is uh
            • 138:00 - 138:30 something like one so I cannot add what uh again one in that table okay so this is the uh property of primary key we cannot have duplicate uh primary key in the table it's fine now with after customer we want first name okay and this should not be null as well and thereafter the last
            • 138:30 - 139:00 name this should be not null as well because we don't want it to be null that's why I'm giving it not null I want to get these details for sure uh passport number or we can leave this as pass passport passport and thereafter I want
            • 139:00 - 139:30 national ID yeah national ID thereafter I want address okay and then we want the contact then we need gender and then we need uh date of birth
            • 139:30 - 140:00 so d o so these are the columns I want in a table so I have uh make this primary key customer IDE as primary key and all the other things should be notal because I want everything should be there now you need to just apply this this is the query we have generated for whatever we want to do like we are creating the table Airline project okay this is the
            • 140:00 - 140:30 table in the airline project and the name of the table is customer and in that customer table we are creating customer column first name last name passport national ID uh address contact gender doob and we are creating the primary key as customer ID this is the SQL query you guys have learned in your previous classes so I'm just applying it and close this great so we are having a customer table now you will come to Airline project and check do we have any table yes we have a
            • 140:30 - 141:00 customer table okay now if I would print this customer table so you will see we have a table whose uh C you will see uh there is some column that is uh customer ID first name last name passport national ID address contact gender and doob we have this now similarly I want to create uh one more for the table okay sorry uh one more table of
            • 141:00 - 141:30 admin admin table so there would be admin ID as well and this would be warar of five size only let's discuss about the admin as well these are the fields we required for the customer now what are the things we required for the admin whenever we are talking about the admin so in admin first of all for uh
            • 141:30 - 142:00 making this unique for making all the admins unique I want a admin ID there this is the first thing second first name the third is last name fourth is first name last name and username and fifth one is
            • 142:00 - 142:30 pass password sorry okay the password these are the things we required from an admin that's it because what we want the admin should be able to login and for login into the system we need username and password and for the authentication like which what's the name of my admin we'll get this and the unique uniqueness would be uh declared by admin ID so this is what we need to need to have in a admin table so
            • 142:30 - 143:00 let's go to the admin and we have uh added a admin ID now the first name first name last name
            • 143:00 - 143:30 username and the password let me make these things not okay let's apply this as well and yeah we have now admin table as well with us now uh we are left with what the flight one so what are the things required in a flight
            • 143:30 - 144:00 table so if we talk about the flight table so let's go to our project and open this flight table here is the uh add flight so in the flight table what we have flight ID flight name arrival departure duration seat spare and flight date
            • 144:00 - 144:30 that's it so these things should be there in my flight uh database because we are filling these details for adding a new flight so I'll go and create a flight table table okay so for that similarly we will do same thing we will uh hit this write create new table and the name of my table would
            • 144:30 - 145:00 be flight okay and thereafter the first thing is flight ID and this would be of watch of five size and thereafter the first thing is flight name then I should have the
            • 145:00 - 145:30 arrival then departure then we should have the what are the things we need to have flight uh flight ID flight name name arrival departure then duration what is the total duration of the flight
            • 145:30 - 146:00 duration and seats thereafter we will have what we will have we want to have after the seats uh what was the thing seats fair and flight data okay so it's
            • 146:00 - 146:30 fair what are the fairs we need to pay and then date what's the date of the flight that's it so we are done with the flight table as well apply this and close so now we have admin customer flight the last thing to do is the book ticket or like the ticket one so whatever the details we are getting from here for the book ticket we
            • 146:30 - 147:00 need to store that in a ticket table itself because ticket should have all the knowledge of flight of and the customer because you need to know now like you should have the knowledge of which ticket like for which flight we have booked the ticket and and at the same time we want to know for which customer we have booked this ticket and okay so we need to have all the details in
            • 147:00 - 147:30 the ticket table so we'll create a table again right click create table give this name as ticket cool and let's go to the column first ticket ID so ticket ID is the must to have thing it would be a again of five size now we are done with this the second thing we'll have that is flight ID
            • 147:30 - 148:00 okay we'll take flight ID we'll try to store flight ID so that we'll able to understand which flight we have chosen thereafter I want to store [Music] uh customer ID customer
            • 148:00 - 148:30 ID so that we will able to understand which customer for which customer We are booking then arrival and then departure and the first name of the customer last name of the
            • 148:30 - 149:00 customer and something more we want yeah we need we need to have the gender and the contact vender and the contact one uh let's see do we need more stuff
            • 149:00 - 149:30 arrival departure is done ticket ID is done customer ID first name last name gender Fair should be there or not let's check what are the details we are displaying over the ticket so over the ticket we are arrival div contact number flight name yeah I don't think like we need to uh get more detail for the ticket so it's fine if you uh need some more to perform some other operations so
            • 149:30 - 150:00 you can add some more data here but for now I guess this is enough uh let's create the table now so now we have admin customer flight and tickets okay so we are done with the creation of the database we have admin table we have customer table we have flight table we have the ticket table so we are done with this now from the next video
            • 150:00 - 150:30 we will start working over the joining like we are done with the creation of database we are done with the creation of the front end things now the last thing remains that is the uh connection between this database and the project and all the uh logical things whatever the functionality we want to provide to all the buttons and all the frames we need to implement those things so yes
            • 150:30 - 151:00 from the last next video we will actually implement the things which is required in the last video we have discussed about how we are creating the database and uh we have created all the tables in the database like we can just have a look like we have created admin table customer table flight and uh ticket table now the point is that uh like we have discussed about these
            • 151:00 - 151:30 things uh two yeah so we were discussing this like we are having the GUI and now we need to connect this GUI with the database with the logical uh ordering okay like for searching the customer we need some other loog Logic for adding the customer we need some other logic and like for everything we need to perform some operations with the database we need to interact with the
            • 151:30 - 152:00 database and thereafter perform some operations with the data and with the GUI okay let's say whenever we are creating the table whenever we are having the add customer we are adding some customer that time whatever the data is there over my screen I want to store that data into the database whenever I'm having a book ticket functionality so in this first I will
            • 152:00 - 152:30 get the data about the which flights are there then I will store the data when I'm clicking the book ticket function okay when I am clicking this uh that book ticket function so we need a different Logic for all different features so so like we will build that logic but uh before that what I want to discuss like uh there should be something which
            • 152:30 - 153:00 will connect like if there is a land and there is a land and in between these two lands We There is a river like no land no land between no land is joining these two uh Iceland okay like Iceland or whatever you can say different lens so how we will able to connect these two lens if I want to uh have a connection between two so for that we need a
            • 153:00 - 153:30 bridge we need to have a bridge which will allow us to connect uh which will allow us to move from this particular place to this place this is what we need so for this particular thing for this particular thing as you know like for joining these two different LS by each other we need a bridge similarly whenever we are creating our full project full stack project and we have
            • 153:30 - 154:00 the front end and the back end and for uh connecting these two between each other we need to have a bridge and that bridge is called driver okay that bridge is called driver okay driver is the uh thing which will allow us which will allow us to join the front end and uh the back end so first
            • 154:00 - 154:30 of all what which kind of driver we are going to use okay so I would request you one thing don't try to emphasize over this driver because you will like if you will ask question how this driver is connecting these two I want to know that and like you're going in the into the D depth and depth if I will start discussing about the driver how driver is implemented then I know you'll not be able to understand a single thing so that is not our concern right now the
            • 154:30 - 155:00 concern is to connect the database the front end and the back end okay and for that we will use this driver you just need to understand this thing we will use a driver the name of that driver is jdbc okay this is the name of the driver okay this is the name of the driver jdbc driver we will use and this is always used whenever we are connecting a Java project Java file with
            • 155:00 - 155:30 mySQL okay whenever we are connecting these two at that time we will use jdbc driver okay this is used for connecting Java with mySQL am I clear great so this is the driver we need to connect with the database perfect perfect now if you know this what why we are using the driver the driver is used to connect front end and back end so that
            • 155:30 - 156:00 they can interact okay now if you know this thing so let's get on to the project and discuss the first ever first ever thing we are going to implement what we are going to implement uh let's get into the add customer so this is my customer uh panel this is my customer panel and here what I want I want to
            • 156:00 - 156:30 have a auto incremented or autogenerated customer ID okay so for that uh I want to give a fashion like customer should be denoted as CS okay there should be a short form in my database that customer should be denoted in CS and flight should be denoted at as FL the admin should be denoted at ad and ticket should be denoted as TK so this is
            • 156:30 - 157:00 customer this is flight this is admin and this is ticket okay these are the things I want to be denoted in the short form so for the first customer I will have CS 00 1 and subsequently I will increase the number okay CS 003 so in this way I will increase the number and this would be
            • 157:00 - 157:30 this would be my ID customer ID similarly for flight FL 001 FL 002 FL 003 this is what I have decided I want my ID should be in this manner so that's why I'm giving this gives me a proper like feel that yeah this is a way of giving some uh constructive uh ID to a particular stuff
            • 157:30 - 158:00 isn't it so similarly for ad we will have 001 and for TK ticket 001 so in this way we will have these things I hope I'm clear so this is what I want so what I want my customer ID should be like if uh yeah let me discuss that one thing if if I'm having my table this is my database let's say this is my database and if there is nothing in my
            • 158:00 - 158:30 database right now so I should get uh get the default customer ID or default anything like right now in our uh database we don't have anything we don't have anything so if we don't have anything so we will we should get a default customer ID as cs001 because right now we are adding the first customer if we have added few customer let's say we have cs001 CS 002 CS
            • 158:30 - 159:00 003 Now the default ID I want that should be the Max uh I will take the maximum one I'll take the maximum of whatever the things in my database and then I will do one thing I'll remove this CS I'll take this 003 convert this into the number this is three now I will add this to one it became four and convert this into this uh number format that is it should be in the three-digit
            • 159:00 - 159:30 format and now it would be this and we have CS I will join this and now I will add this to my database and display over the screen this is what I want cool like first of all if there should there's nothing in my data I will simply display this if there is something in my database I will choose the maximum one till the uh till the point we have maximum I'll take that
            • 159:30 - 160:00 maximum split it into two parts I'll get this I will change that uh format into simple number format I'll add one number and it became four now after getting this four I will convert this into 004 okay and then add with this so this is how we will deal uh deal all the uh like IDs okay and we will autogenerate these IDs okay
            • 160:00 - 160:30 so for that what I want let's go to this add customer and try to uh get these things so what I will do let's create a function okay let's create a function that is public void and auto the function of functionality of this function is to generate the Auto ID so the first thing I
            • 160:30 - 161:00 want is to connect with the database so for getting the connection with the database I need to uh uh declare my driver so for that what I will do I will write class dot for name okay what whatever the three lines I'm going to write you need to write these three lines everywhere whenever you are creating any like you are connecting with any database so this you can remember or you can just have a
            • 161:00 - 161:30 look like yeah this is what I need to use so whenever you will uh Google Search now anything you will get these three line easily so you can remember this but it would be great if you will understand the uh logic behind this okay so yeah this is what I was saying now here they want the class name so give the class name
            • 161:30 - 162:00 as uh com okay com. MySQL com. MySQL do jdbc dot driver as I told you we are going to to use this jdbc driver so for that we have given this name now this will uh ask you to include this driver okay it will ask
            • 162:00 - 162:30 you to include this driver so you have to click over here and you are getting this much of uh like suggestion so first of all surround this with the trian catch okay so we have surrounded this with the trian catch thereafter we need to have two variables okay so let's create two variables that is uh that is the connection
            • 162:30 - 163:00 one connection con what is this variable what is this so actually this you need to import the class uh java.sql connection because this connection has some proper functionality so let me discuss that first this connection is having a functionality called connection okay the name suggest actually it is actually responsible for connecting the front end and the back end we declare it
            • 163:00 - 163:30 in the front like code in our code and it will store it will store the connection which we have uh built between our front end or our code and the back end it will store that connection and we'll see how we are storing the connection and how we we are using that connection so we'll do that and thereafter one more thing prepare prepare statement uh give me a
            • 163:30 - 164:00 minute statement okay let's give this name as pre so what is this prepared statement again you have to uh include this this is prepared statement you have to import the class okay Javas SQL do import so actually what is this prepare statement as connection is storing the connection between database and the uh code prepare statement
            • 164:00 - 164:30 actually used to prepare some message prepare some queries which we are going to run in the SQL Server okay which will be running in the SQL Server we will prepare that statement over here in the code and then we will send this prepared statement to the database and then we will execute this statement and get the result whatever the result we are we want you will understand this more when
            • 164:30 - 165:00 we'll uh walk over this okay so now what I want I want to store the connection okay I want to store the connection with con and I'll use my driver manager manager Dot get connection okay get connection from where I want my connection from uh like
            • 165:00 - 165:30 whatever the things I'm writing over here you have to remember this okay just the basic thing and there is a format I always uh forgot these all things so that's why I'm also having the things in front of me so that uh there should not be any mistake so this should be jdbc okay and call in MySQL then again call in to for/ and
            • 165:30 - 166:00 Local Host because what is the Local Host Local Host is the host which gives you that whatever you are searching is present in your laptop only you are trying to connect with your laptop only oh sorry with your machine whatever the data you are searching that is over your laptop only okay that is the Local Host otherwise if you are getting the uh some data from other server so you have to
            • 166:00 - 166:30 give the location or the address of that server over here IP address of the server you need to give it give here then you'll able to connect with that database right now we are connecting with our uh uh local like whatever the data we have that is locally present in my machine itself so that's why I'm giving it Local Host okay Local Host for/ what's the uh name of my database Airline SL
            • 166:30 - 167:00 project that's it close this and now you have like where you have uh stored your database you have stored like in the root like this root is always a basic uh start of your database okay you always stored your database uh this is the credential you need to provide because it like your airline project database is in what MySQL so how
            • 167:00 - 167:30 whenever you are opening your MySQL server or workbench they will ask you for what they will ask you for username and password so that is the username username is root and the password whatever the password you have created uh my password is this fuse uh 38 # iy USS this is the this is my password for the workbench so that's what I have written over here you can you have to write your own password
            • 167:30 - 168:00 uh password whenever you are using this particular line so two things you need three things you need to write by yourself whatever the name you have given to your database this is the root this would be same for everyone and here you need to to change your password whatever the password you have you need to write over here if you have not given the password you need to leave this empty okay so we need to import the
            • 168:00 - 168:30 driver manager class as well so that's why we will import the driver manager class and they will give us uh try and catch exception so we need to add uh Clause catch Clause because it may happen like sometime we are trying to connect with the database we are trying to connect with the database but that database doesn't exist so we will get those error from here okay exception message from here now
            • 168:30 - 169:00 this connection this connection is actually storing my connection with the database because here we are connecting our database that's why I have given the location of my database okay I have given the root of username of my database I have given the password of my uh database that is of my SQL Server okay I have given everything to this driver manager to go and access that uh particular thing and that whatever the
            • 169:00 - 169:30 access we got we are storing that accessibility in this connection okay we are storing that thing in the connection now what I want now actuality like the actual thing whatever we want to do is would be here only like what I want I will create a prepared statement that's what I have just told you now what you need to do you will uh create a statement
            • 169:30 - 170:00 so uh pre is equals we will store this in this pre prepared statement we will prepare the statement that is Con using this Con you this this using this connection we will create a prepare statement prepare prepare statement and in this prepare statement
            • 170:00 - 170:30 what we want uh we will write the SQL query you can get uh see here we are getting the SQL query uh SQL symbol because we need to write the SQL query over here so that this connection will run this SQL query in my server and whatever the data will get that would be stored in this okay so that will not store in this this will uh like this will H this pre will store
            • 170:30 - 171:00 every uh statement which is prepared to run in the SQL okay it will store everything so first of all right now what I want as I told you we'll select we'll select what we'll select customer customer ID okay we'll actually select Max customer ID okay we'll select
            • 171:00 - 171:30 Max we'll select Max customer ID from what from customer table that's it we need to write this what we want we want to select the max customer ID from the table as we have discussed now we will execute this query so I want
            • 171:30 - 172:00 to store the result in result set okay this is a result set which will store all the data which you will like when I will run this select Max customer ID from the customer uh table then whatsoever like data let's say in the last discussion we got now like CS 003 was the maximum one so we will get that uh customer ID and we'll store that customer ID in the result set
            • 172:00 - 172:30 result is always storing whatever the data you are getting from the database so that will be uh let's give the name as RS is equals to pre do execute execute query uh pre dot execute query and here we have executed the query and we need to import the result set as
            • 172:30 - 173:00 well so we have imported the result set now the next thing is wait what happened yeah so the next thing is results at rs. RS equals to pre execute query so we
            • 173:00 - 173:30 whatever the result we have received that we have stored in the pre do execute like result set now now after this what I want I need to check whether there is something in my database or not like it may happen now my database is empty or what so for that I would do one thing first initialize my result set okay first I initialize my result set next this is how we initialize the
            • 173:30 - 174:00 result set now we will check if RS RS dot RS do next exist okay or we can write RS dot get string rs. get string and here we will write which string we want Max
            • 174:00 - 174:30 of customer ID okay if that is equal equals to false if that is equal equals to false or null then what we will going to do we'll simply set what let's go to the table uh like this and what is the name of this text field we'll get the name so change
            • 174:30 - 175:00 this to customer ID that this means like rs. get string we want that string whose customer ID is maximum if we don't have that string in the table then we just need to write uh we need to set C ID do set text we'll set the text as uh
            • 175:00 - 175:30 CS 001 as I told you this would be our default customer ID if this is not the case then this means we have some data in our table so that would be like this uh we will first get the detail that is we'll create a let's say create a long long variable let's create a long
            • 175:30 - 176:00 variable and thereafter this would be my ID what I need to do uh I want to uh pass the string into long and here uh I want my Str rs. get string rs. get string that the string is Max
            • 176:00 - 176:30 Max customer ID and with this what I want I want the substring of this what I want the substring dot substring okay uh no I need to come out of yeah what I want I want the sub string sub string
            • 176:30 - 177:00 okay and here I will give the begin statement that is begin index would be second as we have discussed I would start from here this is the actual number I want that is 0 1 so I'll give the beginning index x0 and the ending index would be what ending index would be the last one so I'll write RS do get get string rs. get
            • 177:00 - 177:30 string and that string is nothing but the Max and this is Max of customer ID and after getting this I just want the length and that's it we are done with
            • 177:30 - 178:00 this okay so this is what we want now we have the ID after having the ID just want to increase by one and here I want to set the Set uh cust ID dot set text okay set text here I want to
            • 178:00 - 178:30 give cs plus now string dot uh sorry CS now I'll add whatever the details I have right now string dot format okay I would love to format the string what is the title of the string
            • 178:30 - 179:00 now give me a minute yeah here I want to give the string of the format like I want in the three format okay three format so I will write like this okay thereafter uh we will give the argument that is ID and that's
            • 179:00 - 179:30 it we are done with the Auto ID generation okay we are done with this Auto ID function let me just call this Auto ID in the Constructor so that whenever I will why I'm calling this Con in the Constructor because whenever I will run my uh frame this should be run with that uh Constructor as well whenever I want I want this uh customer
            • 179:30 - 180:00 ID Auto ID should be run whenever I'm opening my ADD customer so we can check with this once we can have a check so let's go to the project and let's try to run this do we are getting or not so let me login if I will hit the add customer so right now we are not getting
            • 180:00 - 180:30 anything we are getting some error over here that is Count class not found okay com. my. JD jdbc driver does not found uh okay okay yeah we will not be able to run this because uh I forget to uh inform you one thing like go to the dependency you need to add the dependency right now you don't have any
            • 180:30 - 181:00 dependencies with you so you have to add the dependency you need to right click like what what is this dependency like actually we are trying to use this driver but we don't have that that driver with us so that's the actual so that would be added in the dependency so you will have this dependency as here okay test package and dependency so you need to go to the dependency click over the add dependency and search here
            • 181:00 - 181:30 MySQL okay so you will have module first thing here you have now module database MySQL so you can get one of this either local or Central so you can get local centrer any of them both of uh that is uh like enough for your project now you will see here you are getting like something so I think we have added all the yeah we have added all all
            • 181:30 - 182:00 the things over here now let's try to rerun this once let me close this okay sorry yeah let me close this yeah now let me log in customer add customer yeah whenever I'm hitting the add customer I'm getting the cs001 as
            • 182:00 - 182:30 the default ID for the first customer okay if I would add this customer and again try to get something new I'll able to get but that I need to implement uh again for the in the next video in the last session we have implemented this uh Auto ID functionality and we have added that into the Constructor and I had explained why we have added it into the Constructor now in this video
            • 182:30 - 183:00 whatever the things like in this video the main agenda is to implement completely implement this customer um panel in which we will hit the customer add uh add button and the detail of my this C particular customer should be added into my database okay this is the agenda of this session and yeah so let's get into it and try to implement this feature so as in the last session what we did to
            • 183:00 - 183:30 connect with the database okay as I told you uh there would be these four things the connection prepare statement and this uh driver we need to add these four line everywhere whenever we are connecting with the database okay so I would simply copy this and what I will do I want to add the functionality to this button isn't it I want to add the
            • 183:30 - 184:00 functionality to this button so I'll uh right click over this button okay right click event action action perform go to the action perform okay you'll have this function over here now in this function just paste this that line okay I have pasted this line now you will be asked to add the like surround statement with trian catch or surround blog with trian cat so I will surround blog with the trian
            • 184:00 - 184:30 catch and thereafter you need to add one more uh Clause of add Clause so that's it now we are done with the connection thing with the database now what we want actually here what do you want you want whatever the things you are writing over here like first name last name passport national ID address contact gender everything whatever the things you are
            • 184:30 - 185:00 writing over here you want to get these things and store this into the database so for that we want to get these things first so I'll uh create I'll create uh like these are what we are writing a string string these all things are string so I'll create a string of all of this so first of all let's create a string of customer
            • 185:00 - 185:30 ID so customer ID let's say ID is equals to what cust ID dot uh uh it's this yeah Cur ID get text what does this mean by get text so whatever the field I have this customer field I have changed uh the name of this
            • 185:30 - 186:00 in the last session itself now uh change the variable name with the cust ID so I have changed this name so that's what I'm writing over whatever the text return over here I want to get that text and that text is it in the string format so that's why I'm able to store that thing into the customer ID now let's create one more string of uh first name and now let's go and change the
            • 186:00 - 186:30 name of this as well change the variable name with first name okay so this would be first name do get text okay again let's change everything uh this to last
            • 186:30 - 187:00 name this with passport this with national ID this is address so change the variable name with
            • 187:00 - 187:30 address this is contact and this is male so change this to male and this one is female change this to female and this is uh date yeah that's it so we have changed
            • 187:30 - 188:00 all the names of these things now go to the function and I want to get the surname so string last name equals to last name do get text
            • 188:00 - 188:30 string uh customer ID first name last name and now we want password so passport do get text thereafter string string uh pass uh with the passport uh what I need next that is national
            • 188:30 - 189:00 ID national ID is equals to national ID do get text okay now with this uh again I want to string and this would be my address is equals to address address. get
            • 189:00 - 189:30 text then string now I want contact so contact is equals to to contact. get text string uh with the contact uh thereafter
            • 189:30 - 190:00 I was having gender so I'll create a string of gender is equals to empty right now because I have to check if my main do is selected I will check whether I have selected my male radio button if that is one is selected so gender is equals to
            • 190:00 - 190:30 male okay and if that is not the case then obviously I had I had selected gender as female and at last string I want to change uh my date into
            • 190:30 - 191:00 string format so right now what is this my date is in the date format and I want to change this to change this change this into a string format so for that I have to uh first change this into a format first of all we will change the date into simple uh format so date format we'll change the format of the date format uh date format is equals to
            • 191:00 - 191:30 uh new let's give the name da okay to new uh simple date format and in this we will give a format we want it in year month and then in DD
            • 191:30 - 192:00 date and this is the format we need to uh include this the class uh date format uh okay e would not be there we need to improve the class yeah simple date format and we need to import this as well now fine so we have uh converted
            • 192:00 - 192:30 the format of the date which we are getting like we have uh like given a format of the date now whatever the date we are getting uh from the uh frame we will try to convert that into this format okay and then we'll store this into the database so for that we will create a string date is equals to uh da we want
            • 192:30 - 193:00 to use this da format da format and what is the name of my date that is date dot get date okay and that's it we have converted this date into uh like first we get the date and then we format it into this
            • 193:00 - 193:30 format and this kind of string is stored in this date and now we have all the things which we are uh uh getting from the user uh sorry customer and then the next thing is like what what we have done we have established a connection between uh database like using our driver we have established the connection between our database and the front end now we'll use this and write the query
            • 193:30 - 194:00 what this prepared statement is the name suggest it store all the prepared statement right now we will prepare some statement after preparing all the statement we'll have we'll store that into the prepared statement and then we will execute so right now we are just preparing the statement and the first statement we want to write that uh prepare statement prepare
            • 194:00 - 194:30 statement and in this we will write uh what we want we want to insert okay we want to insert into what into customer table customer we want to insert into the customer table okay and what are the things we want to insert first we want to insert customer
            • 194:30 - 195:00 ID then we want to insert first name then we want to insert last name then we want to insert passport then we want to insert national ID then we want to insert address then we want to insert what uh contact thereafter
            • 195:00 - 195:30 gender then we want to insert At Last Date okay or do uh whatever we have put into the database let me just check it once what are the things we have in the database before that we need to start the my skill server so I'm starting the
            • 195:30 - 196:00 server I need to give the password and yes so this was our table and like database in this table I want to see the customer table and this is do what are the these things I have written over here now whatever the name of my uh columns I need to write those things over here only okay so that's why I
            • 196:00 - 196:30 checked cross check this thereafter you need to WR value values and with this value then like how many uh columns are there that is customer ID 1 2 2 3 4 5 6 7 8 and 9 so there are nine things so you need and you want to give this nine uh things as an input into the database
            • 196:30 - 197:00 so for that you need to use nine question mark 1 2 3 4 5 6 this is 6 7 8 9 okay nine question marks we need to get these are the normal SQL query what we are writing over here so that's why I'm not explaining this because you have already studied this so pre equals to con do prepare statement we have prepared the statement now whatever the
            • 197:00 - 197:30 fields and column we have return we have given the question mark that means we need to give it now like as a variable we want to give the input as whatever we want to put in that particular column so pre dot now we want to set the string in place of that question mark we want to set the string which string uh for first first means the customer ID okay first mean customer ID at this point what I want to insert I want to insert
            • 197:30 - 198:00 customer ID whatever the name we have chosen over here this is customer ID okay customer ID thereafter I again pre dot set string one comma uh this would be my first name and this should be not should not
            • 198:00 - 198:30 be equals to one this would be two and we need to change this string of to small T and yeah it's done again pre dos set string 4 three and the third index is last name therea again pre dot set
            • 198:30 - 199:00 string four and the fourth one is passport pre dot set string uh is Fifth Fifth one was national ID so national
            • 199:00 - 199:30 ID thereafter pre do set string as sixth one sixth index a national ID uh now we are giving address and let's change this T to small T and give us semicolon at the end yeah again pre dot set string with seventh index and address is
            • 199:30 - 200:00 what uh address address address not address it was contact pre do set string set string uh 8 comma uh contact not the contact now it's gender cool pre do set
            • 200:00 - 200:30 string at the ninth place we are putting what okay first we need to find put this T over here and index we have given the last thing was date it was State and we are done with this we are done with the preparing the statement so we have prepared the statement now and the last thing we want is to set the string like we want to execute this
            • 200:30 - 201:00 query so pre dot execute update okay this this is what we have done we have updated the things because we want to update the table so updating the table with this particular query so we need to write pre dot update uh pre dot execute update and this column with this line we are insert we have inserted the uh whatever the things we want to insert into the
            • 201:00 - 201:30 table and we are done now I want to show the message like I should get a message like yeah I have inserted the things into the table so for that I will use a j option J option pain dot show message uh dialogue so message dialogue where I will write uh null over here we don't
            • 201:30 - 202:00 want to give any preferred parent component okay and here we want to give the message that uh customer added successfully okay and done that's it that's what we need to do and we are done with this adding customer nothing we did uh new we first
            • 202:00 - 202:30 get all the details from the table thereafter we just WR write these four lines as the compulsory line which we have return in the last video as well I just copy that and paste over here thereafter just return this particular uh query on line query and given these fields and then simply pre uh pre- do execute update and that's it let's try to run this once whether it is working
            • 202:30 - 203:00 fine or we are getting we are able to insert these things into a table or not so for that I will first run this main so running this one let's open add customer and we are getting this default
            • 203:00 - 203:30 ID now write the name as peush Char passport number is something like this national ID is something like this address Del contact number something like this mail and let's choose any date so we have choosen the date we have given a small length we can increase the length
            • 203:30 - 204:00 so that we will able to see what is the exactly date we have chosen now we need to add this let's click over this and yeah we are getting some error what's the error we are getting so you have an error in your SQL check menu we have some done something wrong in uh the SQL insert into customer okay the spelling of values is
            • 204:00 - 204:30 incorrect we values okay now we have to rerun the project let's run this login add customer and again we need to write v
            • 204:30 - 205:00 j some passport ID national ID DH Delhi contact and some particular date let's add and yeah customer add successfully we are getting the message and after inserting this over here let's get into the
            • 205:00 - 205:30 workbench table and reint this customer table and check whether the data is stored in the database or not and you'll see whatever the DAT whatever the things we have written there that is stored in my table as well now CS 001 P CH this is my password and whatever the things I have given that is stored over here properly now let's go to the table itself cross this okay and again let's add new
            • 205:30 - 206:00 customer the thing is that now the challenge is that do we are getting the default customer ID or not updated customer ID so we just wanted to see and you see this now we are getting the updated customer IDE CS 002 now my customer panel is working properly let's implement this add feature in the flight as well and in the admin as well so these two things we can add so let's go to the project and
            • 206:00 - 206:30 similarly what we have done over here we need to add that thing same first of all we will copy this four line copy this go to add flight okay go to the ad flight we have not added the add flight uh okay no issue first of
            • 206:30 - 207:00 all go to this like what I have done go to the design right click over here event action and action perform you will be directed to this function and let's copy this uh they are saying to import like you are pasting the code you need to get this java.sql uh Library these are
            • 207:00 - 207:30 things you need to import and press the okay button that yeah I want to import these things and with this you have to use the try and catch as we know the drill so you can surround this surround the block with try catch and add one more clause and we are done now similarly the way we were getting all these details and adding that into the table
            • 207:30 - 208:00 same we need to do first of all we need to change the name of the flight this is flight ID okay this is flight name this is
            • 208:00 - 208:30 arrival arrival departure duration
            • 208:30 - 209:00 seats fair and dat that's it so we have changed the name now let's go to the source and try to write all the uh like get all the uh details from the table sorry uh from the frame so string uh flight
            • 209:00 - 209:30 ID so let's keep this like this flight ID is equals to flight id. getet text get text and and string flight name is equals to flight name do get
            • 209:30 - 210:00 text and string uh the third thing was arrival yeah arrival is equals to uh arrival. get text uh string
            • 210:00 - 210:30 departure do get text string uh uh uh seats seat is equals to seat dot seat dot get text how many seats are
            • 210:30 - 211:00 there and string depart okay in departure I have just used this this is departure and this string string feir is equals to Fair do get text now at the end let write
            • 211:00 - 211:30 string now again for the date what we need to do date format date format uh write da equals to new simple date format okay and inside give the format that is uh month and
            • 211:30 - 212:00 date okay and let's import these two things so import date format java. text yeah we need to import both of this and with this what I need to do I
            • 212:00 - 212:30 will uh create a variable of date is equals to da do format okay format my date that's it date do get date and I'm done with all the fields I uh am required to add or update my table
            • 212:30 - 213:00 into the database now just come over here and use that prepared statement to write the query that pre is equals to con dot prepare statement prepare statement M okay prepare statement write your skl query that is insert into into
            • 213:00 - 213:30 flight insert into the flight what you want to insert actually I want to insert my flight ID my flight name and my arrival and departure and my
            • 213:30 - 214:00 seats okay and my fair then I want to insert my date okay so after that we'll use this values and how many fields we want to insert 1 2 3 4 5 6 and seven so there are seven things so 1 2 wait 3
            • 214:00 - 214:30 4 5 6 7 so seven things we want to insert it's cool uh let's once check in the database as well what what are the fields we have flight ID flight name arrival departure duration we missed this duration so we didn't didn't get this duration so let's create a
            • 214:30 - 215:00 string duration is equals to uh duration do get and write it uh anywhere but I will write it over here so that the fashion should be
            • 215:00 - 215:30 followed duration and add one more question mark looks fine and after this you need to set the string set string set string uh for the first index
            • 215:30 - 216:00 that is flight ID uh pre do set string why I'm always using this set string uh the second thing is flight name then pre do set
            • 216:00 - 216:30 string third that is uh uh uh arrival then PR dot set string four fourth is departure departure and with set string okay I
            • 216:30 - 217:00 have used two fre do set string five that is uh duration duration then pre do set string sixth that is uh uh uh what is that
            • 217:00 - 217:30 sheets and then PR do set string okay again this T string uh this is 7 comma and seventh was fair and the last one is 3. set
            • 217:30 - 218:00 string 8 comma date see just let me go and check what I have written this is six okay fine so we have added all the things in the query now what I want I want to Simply write PR dot execute execute quit
            • 218:00 - 218:30 update and that's it now uh with this uh XY sorry execute update and now I want to add this m that message J option pain dot show message dot uh show message
            • 218:30 - 219:00 dialogue and we don't want to give any parent component to this and just wanted to write flight added success
            • 219:00 - 219:30 fully and we are done we are done with this as well but here we have not added the Auto ID uh function so let's do that as well Auto ID let's create this method over here uh let's copy this from the customer go to the top top top top copy
            • 219:30 - 220:00 this go to flight paste just over here and change this with the flight ID light ID what is the name of my variable this cancel check variable name that is
            • 220:00 - 220:30 flight ID copy this and hit okay change this with that one this with that one and select Max flight ID from not the customer from the flight again
            • 220:30 - 221:00 sorry uh yeah from flight and here again flight flight and just need to change one more
            • 221:00 - 221:30 time light ID yeah everything looks fine just change this with FL and here as well F yeah now we are done we can this is the Auto
            • 221:30 - 222:00 ID cannot find the symbol what happen illegal start of expression
            • 222:00 - 222:30 okay M class make class add flight finding okay so
            • 222:30 - 223:00 yeah it's fine now we can simply try to run this and check whether my flight is working properly or not so we have let's remove this login add flight and we are getting fl001 uh data Airways no sorry AQ
            • 223:00 - 223:30 Airways acq job arrival is uh Delhi departure is Chennai and duration is 3 hour seats are 200 Fair is 12,000 and date would be fifth let's add
            • 223:30 - 224:00 and flight added successfully now let's go to the workbench and check whether we are able to add the flight or not yes we are able to flight uh at the flight flight fl001 Acure job aine Delhi Chennai 3 hours 200 seats and 12,000 Fair everything is visible so almost we like two things we are done with that is the add customer and add flight okay so
            • 224:00 - 224:30 further more we will uh do in the next video yes so uh till the last video what we have implemented we have implemented add customer and add flight now uh in this video we will try to implement and the add admin as well okay so yeah so what I have done here as well I have uh copy pasted the add Auto ID class now I need to add one parenthesis over here
            • 224:30 - 225:00 and after adding the parenthesis um I have added this Auto ID now what I need to do simply call this Auto ID from The Constructor okay Auto IDs D should be big good so yeah now I have done this so Auto ID functionality is added into the add admin class and I have changes uh done some changes that
            • 225:00 - 225:30 is ADD admin and all of this which we have changed in the flight as well okay so this is Implement uh like we have implemented this now the thing is that what I want I want to make this add button function function enable that is I will uh click over this go to uh like C over this right click go to event action action perform and in this action
            • 225:30 - 226:00 perform what we are going to do we will first copy this four lines and then simply paste it over here and we need to add the TR and catch so surround the block with try and catch one more add Clause great so we
            • 226:00 - 226:30 are done with this now the same thing what we have done in the flight that is we need to prepare the statement we just need to write the SQL queries now and prepare the statement so we'll write prepare prepare statement okay prepare statement uh we'll write here the SQL query but we need to write con over here
            • 226:30 - 227:00 because this connection is established with this Con only and yeah now what we want we want to again insert insert into admin we want to insert into the admin and what are the things we want to insert so these are the things we want to insert and first of all let's get
            • 227:00 - 227:30 into the workbench and check what are the things I we have admin first name last name user and password so let's go to here and change the name this is uh admin ID this is first name it was first name first name
            • 227:30 - 228:00 yeah this is last name username and password let's go back and what we did in the last videos we first need to get the details from
            • 228:00 - 228:30 the frame so string uh ID admin ID is equals to what uh it would be G uh admin ID do get text get text then
            • 228:30 - 229:00 string uh first name is equals to first name do get text again string last name is equals to last name do getex
            • 229:00 - 229:30 string first name last name and username equals to usern name Dot okay what the name I have given to the user that is username okay copy this okay go here change it to the
            • 229:30 - 230:00 username do get text thereafter string password is equals to password do get text and yeah we are done with these fields now we will
            • 230:00 - 230:30 simply write all the details over here that first of all I want to insert admin ID then first name then last name then username then password great thereafter we want to write we need to write values and there are five Fields so we will write five question mark 1 2 3 4
            • 230:30 - 231:00 5 okay now thereafter 3 dot set string index is one and let's write what I want to uh insert at the place of admin this variable so so sorry
            • 231:00 - 231:30 sorry so we'll write over here admin ID therea second thing is pre do set string two that is admin ID now the first name
            • 231:30 - 232:00 okay and pr. set string third index and this should be last name pre do set string uh fourth that is
            • 232:00 - 232:30 user name username last one is PR do set string again string fifth one
            • 232:30 - 233:00 and that is password that's it after this we need to write pre dot XZ execute query sorry not query execute update update and that's it let's add J option
            • 233:00 - 233:30 pain J option pain dot show message dialogue and I don't want to add any parent component with this and just wanted to show admin added
            • 233:30 - 234:00 success okay and we are done with this as well uh we can check it and try to add one admin
            • 234:00 - 234:30 yeah we can try to run this and check it is working properly or not so this is the login log into this now go to the admin add
            • 234:30 - 235:00 admin and we are getting the auto generated admin ID let's give the name fush last name ch username p c password 1 2 3 4 5 and add it admin added successfully we can go to workbench and check yeah so admin is added into
            • 235:00 - 235:30 the uh table and yeah we are done with the admin table now the next task is like we are done with the admin table we are done with three tables like three forms uh three pages that is admin page customer add customer add flight now let's go to the uh search customer okay let's go to the search customer and here what I want let's
            • 235:30 - 236:00 change this to uh like first I want to remove this uh from here delete this and I want to add a normal text field over here yeah so that I would able to make it visible the date what I want to print that should be visible over here yeah so
            • 236:00 - 236:30 what I want whenever we are writing any customer ID over here and we will hit the search button all the details of the customer should be uh visible over here okay so for that we have to implement the functionality with uh this search button we'll go to the search button and this is the fun this is the function for that search button and what I want I just wanted to get the customer
            • 236:30 - 237:00 ID from here okay from this table or this Frame so first of all the very first drill is to copy that for line and I guess we had copied for the last no we have to copy that four line so let me get let me go there and copy this okay now go to the search customer and let me
            • 237:00 - 237:30 add okay so we have added this and Surround block again add one clause okay fine so we are done with this now what we want from the page that what is the customer ID and if we get the customer ID we will try to search that customer through that customer ID okay
            • 237:30 - 238:00 so string customer is equals to whatever the field name so let's try to change this to cost ID equals to cost ID do get text we're getting the text now we are we have the text and here we just need
            • 238:00 - 238:30 this much only and we will write a query that I I am having a customer ID and I want to search this customer in my customer table so for that what I will write prepare statement I will write uh PR before this prepar statement I need to write
            • 238:30 - 239:00 con and yeah I'll write uh select and everything from customer okay from customer table where but now I'm giving the uh condition where
            • 239:00 - 239:30 customer customer ID is equals to this what is this this is pre do set string PR dot set string one and this is my customer I want to search this customer okay so we will search this now as we had done with the result set sorry
            • 239:30 - 240:00 we have used this result set in Auto ID we will use this result set as well because right now we are searching something we are getting now selecting selecting from that means we are getting something from the database so we have to store that whatever the data we are getting from the database we have to store that into the result set okay so result set RS okay I'm giving the name as RS we need
            • 240:00 - 240:30 to import the class so we have imported so in this what I will uh do whenever I will run this query and whatever the data I will get that would be stor in this RS so pre dot execute query okay we are executing the query because right now we are running the query whatever the query we have run return over here we are running that query and getting stored in RS
            • 240:30 - 241:00 now what I will do I will check if RS dot next is equals to is equal equals to false if this is uh rs. nextt not equals to false that means this customer does exist in my database okay this customer does exist
            • 241:00 - 241:30 in my database so what I need to do I want to get these I want to get the first name of the customer okay and the last name of the CER customer passport national
            • 241:30 - 242:00 ID then the address as well I want to get and again I want to get the contact as well then whether it is like the person is male or
            • 242:00 - 242:30 female so male changes to female and this is simply as date okay let's go to the code and if rs. next is not false that means the customer does exist so if the customer exist what I will do I will write uh
            • 242:30 - 243:00 my uh first name so first name dot this is the first name in the frame okay which I have just renamed this first name do set set text now I want to set the text with what with RS dot get string like we are setting the string now uh there is in the RS we have stored the result we get from the
            • 243:00 - 243:30 database so that's why we will write RS do get string which string I want to get the first name so first name here you need to write that uh thing which is uh like the same thing you have return in the your database like first name is my in my database is written as first name so the way you are written writing over here uh you have return in
            • 243:30 - 244:00 your database you need to follow that uh fashion in uh this bracket and this uh inverted commas okay thereafter the last name dot set text as RS dot get string and in this again we'll write last
            • 244:00 - 244:30 name then we have passport this is passport. set text we'll have uh rs. get string RS
            • 244:30 - 245:00 dot get string passport yes again uh the next is national ID national ID do set text which is RS do get
            • 245:00 - 245:30 string passport and this is national ID then first name last name national ID address address do set text rs. get
            • 245:30 - 246:00 string and this is add that itself thereafter uh contact contact do set string this would be uh RS RS dog
            • 246:00 - 246:30 string and this is contact then there after gender yeah for the gender we we will first get if rs. get get string gender is equal equals to or we can do
            • 246:30 - 247:00 it dot dot equals with mail then what we need to do we will write we will write uh set string what's the difference set string okay set
            • 247:00 - 247:30 text set text yeah so here what we will do we will take mail dot set selected set selected true okay and if this is not the case if
            • 247:30 - 248:00 that is not equals to male then female do set selected true okay and at the last that is the date dot set text and here we'll get RS dot get
            • 248:00 - 248:30 sorry RS dot get string uh that is uh uh do and I guess we are done with this now we can run and check whether it is working fine or not so let's run
            • 248:30 - 249:00 the project before running to this let me move this login customer search customer okay I'm not able to open the search customer we have not added search customer in our design action event event and we need to add this over here
            • 249:00 - 249:30 like search customer is as customer equals to new search customer okay great now uh add this to
            • 249:30 - 250:00 the desktop add customer and make it visible tooth so customer do set visible visible true done so let's run this
            • 250:00 - 250:30 again login cross that one 1 customer search customer and write CS 001 because we have added this customer and hit the search button and after hitting the search button you can see I'm getting all the details you sure this was the passport Delhi contact mail
            • 250:30 - 251:00 and date of birth I'm getting everything so yeah we have implemented this search panel as well okay so we have implemented the search panel now uh what if I don't have any like what if if I don't have like CS 002 in search I don't have this customer
            • 251:00 - 251:30 I'm not getting any message I should get one message like the customer does not exist so for that what we will do let's go to the search customer and this is the button now so in the else condition if that is not the false if we don't have exactly whatever we are searching for then we will write will give the message J
            • 251:30 - 252:00 option pain dot show message dialogue that is bro your whatever you are searching that doesn't does not exist so customer customer does not
            • 252:00 - 252:30 exist okay and yeah done now let's try to run this again yeah we have let me cross this login search
            • 252:30 - 253:00 customer now CS 02 so customer does not exist we are getting this message now it is working properly okay so now we are done with search customer add admin add customer and add flight we are left with book ticket get ticket login okay we are left with three functionality three more functionality okay so we will try to
            • 253:00 - 253:30 implement that in the further videos till the last video we have implemented uh add customer add admin and add flights so in this video we are are going to implement this uh book ticket which is the most important part of this particular project this is the backbone of this project so yeah we need to implement this and there are a lot of uh things that is you have to implement
            • 253:30 - 254:00 this search button you have to implement this this search button you have to implement this book button and this calculate button and a few more operations are there as well so the first thing I I would like to do is to change this uh like table so you need to go to the table content and columns okay what are the columns you want in your table so obviously we want this much of column in which uh I want to get flight
            • 254:00 - 254:30 ID arrival departure flight name duration and date seats and fair I don't want to get so we will change the name here so the first thing I want to change is flight name sorry flight ID the first thing I want is flight ID thereafter the second one is flight
            • 254:30 - 255:00 name and third is arrival arrival then departure and insert like insert new one that is duration okay and one more that is
            • 255:00 - 255:30 date so date okay and just close this and you can see here is the flight ID flight name arrival departure itation if you want to expand this more that can be possible so we can get it in a proper space yeah now what I want whenever I'm uh hitting the search button my uh according to my arrival and
            • 255:30 - 256:00 departure I should get uh according to my arrival and departure I should get the required list of flights in this particular table so before that let's go to let's go and implement this event action action perform okay and this is the action perform here we need to perform the action so now we are well
            • 256:00 - 256:30 uh we know like very well that what we need to do we need to First paste these four lines so yeah I have pasted these four lines L let's include like surround this with try and catch and one more add Clause okay now we are done with this but before that before doing anything what we want like we want to search that
            • 256:30 - 257:00 flight whose arrival and departure matches with the arrival and departure we have given to this particular uh search but so let's take this uh arrival and departure from uh from the uh frame so arrival uh that would be arrival okay let's change the
            • 257:00 - 257:30 name of this so this is arrival arrival the next is departure okay so let's go to the source now arrival is there dot get now this is a combo box so for
            • 257:30 - 258:00 that we need to select some some item now like there are multiple items so we want to select one of them so set so we write dot get selected item Dot to string whatever the item we have selected I want to convert that item into the string thereafter string departure okay similarly we'll write departure dot get selected item to
            • 258:00 - 258:30 string okay it's fine now we have both the things with which we can move want and now we need to write the query that what we want we want like pre is equals to con dot prepare statement okay we want to prepare the
            • 258:30 - 259:00 statement and in this statement what we want we want that flight which who's having arrival and departure equals to this so we'll write select star all no we want to select the flight okay so in the flight table we want to select everything so select star from flight okay
            • 259:00 - 259:30 where my arrival is equals to I don't know and my departure is equals to and my departure is equals to this so moving forward now I need to uh give the particular string for arrival and
            • 259:30 - 260:00 departure so what I will write pre dot set string 3 do set string one comma arrival and three dot set string 2 comma
            • 260:00 - 260:30 departure and we are done with this now thereafter after getting the uh arrival and departure what I want I want to search in in the data uh database so for that I'll need result set which will store my data result set RS is equals to uh pre dot execute now query okay here we will use Query and we need to uh include
            • 260:30 - 261:00 the sorry import the result set okay result set Library so we have imported that and and thereafter what I want now after having this result set now the task is to like get all the details in the table so for getting the detail over the table we need to use some table formatting so for that I will
            • 261:00 - 261:30 first read what is the table formatting of my database so for that I will use one new thing that is called result result set meta data that means the way I have stored whatever the result set data is I want to uh create a clone okay I want to create a meta data
            • 261:30 - 262:00 that means meta like virtual table okay I want to create a virtual table of that result set that is what it is you can understand in this way okay what does this do thereafter we will use we will give the name uh let's give the name RS MD okay now this is this is what I'll in like in this what I will going to
            • 262:00 - 262:30 store I'll going to store RS do get metadata that means what is the real form of the data I want to get that and for using this we need to import the library of this as well so we have imported this now now I have the real form in which the data is present in my database that is in the table format now I want to use that table format so I
            • 262:30 - 263:00 will write one thing first of all I will count how many columns are there okay so I want to count the columns how many columns are there so column count CC and I will write RS D rsmd dot get column count okay I get the column count thereafter now now I want to uh create a
            • 263:00 - 263:30 default table format okay default table model which will be of this particular type whatever the way see what I have done first I executed the query results is in my result set now what I want I want to get the result in such a manner that I can uh view that over the table so this is very simple now like if if I would
            • 263:30 - 264:00 somehow able to get the data in such a way uh in which way the T the data is present in my table so it would be easy to uh print it over the table so that's what I'm doing I'm getting the data in the original format and then I'm counting how many columns are there in my data so what I am doing now I want a default table format default table model to
            • 264:00 - 264:30 default table model okay what is my default table model let's give this name as DFT default table model and and uh this is what uh whatever the name of my table the default table format is this default table model is my table so this is my default default table model because we have just given
            • 264:30 - 265:00 the model so I want to get the default table model so get model and with this I'm having the default table model of my uh table okay I'm having my default table model in give me a minute right now I am having uh I have stored the default table model what is
            • 265:00 - 265:30 this default table model it store the table model what are the what is the table model the way we have constructed our table okay it is having flight ID flight name so this is the table model so we have added this like we have stored that model into default table model that means whatever the table I will print the way I will print my data over the uh table should be in this format okay so now we will simply uh run
            • 265:30 - 266:00 a loop while because it may happen now we have multiple flights so RS dot next that means till that point when my rs. next is not false my uh while loop will run and in that while loop we will create a vector vector is nothing but a similar kind of thing a similar array list kind of thing but in this we don't need to provide any data type okay so that's why I'm uh
            • 266:00 - 266:30 creating a vector over here we don't need to uh give any specific data type so that's why vector v is equal to new Vector okay looks fine this is same like the arror list we need to import this Vector as well okay it's a data type now uh I'll run a loop for INT I =
            • 266:30 - 267:00 to 0 or one you can whatever you can do I equal to 1 I less than equals to CC the number of column count we have and we will put all the values uh we want to print so RS so we will add into the vector so V do add RS do get
            • 267:00 - 267:30 string what we want flight ID you need to write that particular thing which you have in your database V do add RS dot get string string that
            • 267:30 - 268:00 is um flight name okay we do add RS do get string strings s would be
            • 268:00 - 268:30 capital and here I want uh arrival V Dot add uh RS dot get string now
            • 268:30 - 269:00 departure we do add uh duration RS dot get string duration now the last thing is V do add RS dot get string and here we'll get the
            • 269:00 - 269:30 date and that's it at last we just need to add this uh Vector into DFT DFT dot add Row V and that's it this is what we need to do for displaying the table over the table okay so we can have a
            • 269:30 - 270:00 look by running this login into the system book flight uh Delhi to Chennai search yeah after searching we are able to get the uh flight okay
            • 270:00 - 270:30 FL uh one a job Delhi Chennai 3 and and we are getting this um multiple options so we will uh remove that right now so but we are getting the things over the table okay that was the main agenda and we are getting that so Kos now uh if we are getting uh some few options so what we can do table
            • 270:30 - 271:00 content rows so count should be zero okay it would be again rows what I want zero at start so again we can try to run this and
            • 271:00 - 271:30 check book flight Delhi to Chennai search and we are getting it here flight ID is fl001 AC job Airlines Delhi Chennai 3 and date we are getting everything now what I want I want to get the ID over here what whatever the ticket ID so for getting the ID what we need to do we know the drill like we
            • 271:30 - 272:00 have done it multiple times so we will go to the flight okay we'll go to the flight copy the Auto ID function copy this go to the book ticket Source go on the top paste it over here
            • 272:00 - 272:30 and call it auto Auto ID from here and change change this to this what's the name of this label so make it id id only so let's go over here
            • 272:30 - 273:00 id id and this is ticket ID this is ticket ID and slide it TOS light right and ticket ID this is again ticket
            • 273:00 - 273:30 ID ticket ID F so this is TK 001 and and here we will write TK 0 one and yeah I don't want to get it from flight we'll use ticket table and everything looks fine and yeah we can try to run this whether it is working fine or
            • 273:30 - 274:00 not so flight book ticket and we are getting the default uh ticket ID that is tk001 it works fine so two things have been implemented that is getting an auto ticket ID and getting the search like whenever we are searching with arrival
            • 274:00 - 274:30 and departure we are getting the flight now the second task is to get the customer detail okay to get the customer detail so we can get this customer detail from here and the total tickets as well sorry furthermore we will do that but the first task is to get the customer detail so let's go here go to the design go to
            • 274:30 - 275:00 this uh what we can do now we can go to the add customer whatever we have return in the add customer function the same thing we need to do here as well so I will copy this why we need to do multiple time same thing multiple times so that's why copy this go to the book ticket source code and first of
            • 275:00 - 275:30 all go to the search button event action action perform paste it over here contrl
            • 275:30 - 276:00 Z no problem we will write that by ourself only let's change this by customer ID C ID first
            • 276:00 - 276:30 name last name contact gender and fair would be a calculator from here so these are the things we need from a customer so let's copy these four lines first copy
            • 276:30 - 277:00 this paste it over here add try and catch surround block add one Closs get the customer ID so string customer is equals to cust ID dot get
            • 277:00 - 277:30 text okay uh string customer ID equals to to uh cust id. get text we have the customer ID now we just need to write the query and uh that is pre dot uh pre is equals to con dot
            • 277:30 - 278:00 prepare statement prepare statement okay here we need to write this statement that is uh we want to select select star from customer where
            • 278:00 - 278:30 where custom uh where customer ID is equals to this okay okay so excuse me now what we will do we will have RS result set result set RS is equals to pre dot execute query and we'll
            • 278:30 - 279:00 select the one and thereafter we just need to put the details so we'll check again if RS do next rs. next is not equals to false then we'll implement the things over here that is we'll get we'll set the first name by RS
            • 279:00 - 279:30 DOT first name dot set text by RS do get string as this would be what this is first name
            • 279:30 - 280:00 then last name do set text get string and this is last name first name first name last name and then uh we need
            • 280:00 - 280:30 contact contact. set text set text rs. get string that is
            • 280:30 - 281:00 contact and last is gender so gender is equals to gender do set text RS do get string that is uh what I want to
            • 281:00 - 281:30 get gender so right gender and that's it this is what we need and in else condition we can simply write else customer sorry j option P J option pan do show message
            • 281:30 - 282:00 dialogue null comma message that is uh we maybe import need to import the class we need to give the message that customer does
            • 282:00 - 282:30 not exist customer does not exist and that's it we can try to run this once login Al so book
            • 282:30 - 283:00 flight search customer cs001 search no value specified for parameter one okay we have not specified the value so pre do set string 3 do set
            • 283:00 - 283:30 string 1 comma uh customer customer it's fine okay we can try to run this again book
            • 283:30 - 284:00 flight go to this CS 001 and we are getting the details okay okay now the next thing is whenever I'm uh searching a customer like flight from Delhi to Chennai I'm searching if I'm hitting over this my fair should be visible over here okay so this thing we will Implement in the next video till this point we have discussed and we have implemented uh these two featur that
            • 284:00 - 284:30 whenever we are searching for the arrival and departure we are getting the things in the um this table and uh if we are searching some customer so we are are able to se the customer over here now the next task is whenever I'm clicking over the table okay like we are getting different uh different rows okay if I'm getting multiple rows so what I want if I have selected one of that row
            • 284:30 - 285:00 like the flight which for which I just wanted to check the fair so or which I wanted to book so if I would select that particular flight then I should get the flight over here and then total Fair whatsoever with the total fair I would get after uh writing the total number of ticket I want and then hit this calculate button I'll get the total Fair of uh the flight would be here okay
            • 285:00 - 285:30 so let's implement this function first to get the fair of the selected flight okay so how we'll do that uh you just need to click this table go to the event mouse mouse click okay so this is the mouse click function here we need to uh implement the things but for implementing the things now uh let me just explain
            • 285:30 - 286:00 this I'm having the table okay I having the table like this and this table is having some number of columns like this okay it is having some number of column and let's say there there are multiple rows but this is flight ID okay you know flight ID is very
            • 286:00 - 286:30 important if I would have a flight ID then I would able to search that particular flight and if I would able to search the data of that particular flight then in that that data of the flight will have the fair of that flight will have the fair of that flight so I just wanted to get the flight ID of the selected row okay if I have selected this row let's say so I would able to get this flight ID somehow
            • 286:30 - 287:00 if I would able to get the flight ID then I will easily search for the fair so what what I need to do what I will do actually this is something like a matrix this is zeroth row this is first second sorry zeroth column First Column second column third column and so on similarly whatsoever uh the rows I have clicked over that will have that will start with 0 1 2 and three and so
            • 287:00 - 287:30 on so I cannot have an like I cannot fix the row which I'm going to select it but I can fix the column which I'm uh selecting that I just want the flight ID of the selected item selected row so what I can fix over here in column what would would be the index of my column that is zero what about the row the row would be what is my table
            • 287:30 - 288:00 table dot table dot get selected uh table Dot get selected row okay we have row and column now now I want the flight ID okay I want flight ID I have declared a flight ID variable globally here so I will simply
            • 288:00 - 288:30 store the flight ID in this as itself so yeah I will store the value here of itself so flight ID is equals to what's my table this is my table table I'll get the model first get model okay what's the model of my table then I will search the value okay I'll get the
            • 288:30 - 289:00 model of the table then I'll search the value at row uh row comma column okay so value uh so dot get value at so we'll use this function get value at what row and column we have row and column just put semicolon at the end and before this whatever the value we have at that particular location I want to change
            • 289:00 - 289:30 this to string okay now with this we have the flight ID if I have flight ID then using this flight flight idea I would able to get the data from my database so for getting the data from the database I need to use this four line so I will use this four line and copy it over here then uh I have to import uh sorry
            • 289:30 - 290:00 surround it the block with try and catch and use one more catch clause which we are doing from very long and now here we can write the code what I want I want the fair so I want to get the fair so uh and I want to set the fair at this particular location so first of all I need to
            • 290:00 - 290:30 prepare a statement to get the fair from the database prepare con dot prepare statement okay prepare statement and in this I would write I would write like select what select fair
            • 290:30 - 291:00 from flight where flight ID equals to the variable which variable which I am giving to you over here PR do set string and here I will give one and instead of title I'll write flight
            • 291:00 - 291:30 ID okay now after getting this flight ID I can simply have a result set result set RS is equals to what pre dot execute query because we are selecting something now after this RS dot rs. next
            • 291:30 - 292:00 okay now I'll check if uh like obviously we will have so uh we just need to set the value of fair at this location so let's check what the variable name is it is fair so let's go here and write where dot set string sorry set text and what how I will set the text RS do get
            • 292:00 - 292:30 string rs. get string and what's the name of the column that is fair and this is how we will put the fair over the frame by selecting the particular row this is implemented let's check it once so loging into this go to flight
            • 292:30 - 293:00 book and let's try to search from Delhi to chenai I'm searching I got the flight and it will take some time I guess yeah it will see take some
            • 293:00 - 293:30 time yeah we have this Fair of here okay so we are able to get the fair now the next task is to Let's expand this a little so the next task is to Cal like calculate the total fair by giving the
            • 293:30 - 294:00 particular amount of ticket so for that let's go to the design and implement this calculate button go event action action perform and here we need to write the code so what we will do see if I want to calculate the fair so uh we are having the fair at the fair field so I will write over here int uh fair is equals
            • 294:00 - 294:30 to uh integer integer dot pass in okay here we need to write the uh string and that string is nothing but fair dot get text whatever the value we have about the fair we'll use that to calculate the fair and then we'll get uh number
            • 294:30 - 295:00 of tickets number of tickets is equals to uh total ticket okay total ticket uh get
            • 295:00 - 295:30 text now we need to pass this to integer itself integer integer dot Parts in and I will remove the brackets from here and put this bracket over here and that's it so we have the total like fair and the total number of ticket now we just need to have an
            • 295:30 - 296:00 answer that is equals to Fair into number of TI okay now uh I have the answer like I named this name the total Fair as answer so this is answer so yeah answer
            • 296:00 - 296:30 do set string and here I want to change string sorry integer integer dot value of answer sorry
            • 296:30 - 297:00 string string value of answer and put the bracket over here answer dot not set string it's set text text okay uh now I guess that functionality is also implemented let's check once yeah so login into
            • 297:00 - 297:30 this find this this is book flight Deli to Chennai search we are getting this yeah we have this fair over here and let's write three calculate and we are getting the calculated amount that is 36,000 so it's working
            • 297:30 - 298:00 fine now the next task is let me first remove this okay the next task is to implement this book okay now the next ask is to book this one so let's go and Implement
            • 298:00 - 298:30 that let me first click over this go to event action action perform and this is the function we have this we need to implement so the very first thing when we need to uh implement this book ticket is that what are the uh particular fields we need to implement this book ticket for that let's go to
            • 298:30 - 299:00 the workbench let's go to the workbench very view it's not
            • 299:00 - 299:30 working me open this okay so I just wanted to check what are the fields we have selected for the ticket so in a ticket whenever we are booking a ticket we should have ticket ID flight ID customer ID arrival departure first name last name gender and contact we should
            • 299:30 - 300:00 have these these fields so we will first get customer ID this is the ticket ID and the flight ID and thereafter first name last name contact gender fair and everything so let me just try to implement this what are the names of this field this
            • 300:00 - 300:30 is cust ID and what is this first let's try to implement uh string Dot customer customer ID is equals to cost ID do get text okay thereafter
            • 300:30 - 301:00 string first name is equals to first name do get text string last name is equals to last name. get
            • 301:00 - 301:30 text string uh uh contact is equals to contact dot get text and string uh gender is equals to gender
            • 301:30 - 302:00 dot get text okay we have added all like taken all the required Fields now for from the flight we have the flight ID we don't need anything else but we want arrival and departure so string arrival is equals to
            • 302:00 - 302:30 arrival dot uh get selected item get selected item to string similarly string departure is equals to departure dot uh get selected item to
            • 302:30 - 303:00 string okay now after this arrival and departure uh I need flight ID that I have and uh I need one more thing that is ticket ID so string ticket ID is equals to ID dot get text and with this we have all the
            • 303:00 - 303:30 required fields for booking the ticket now let's put this four important line and like add that try and catch and after this we need to implement one thing uh we need to write the connection uh sorry prepare statement
            • 303:30 - 304:00 con do prepare statement okay here we need to write the SQL carry that is we want to insert into ticket ticket and what other things we want to insert that is ticket ID ticket
            • 304:00 - 304:30 ID flight ID customer id id then we want to write arrival departure and first name last
            • 304:30 - 305:00 name and contact then gender this is what we need and let's go to the values 1 2 3 4 5 6 7 8 9 so I guess nine things are there 1 2 3 4 5 6 7 8 9 okay nine things
            • 305:00 - 305:30 are there put the semicolon over here and yeah we are done with this now we need to put nine strings one comma first is ticket
            • 305:30 - 306:00 ID ticket ID PR dot set string flight ID flight
            • 306:00 - 306:30 ID thereafter pre do set string comma uh customer ID then pre dot dot set
            • 306:30 - 307:00 string uh arrival five comma uh departure then 3 dot set
            • 307:00 - 307:30 string six uh first name 3 dot set string 7 that is last name now pre dot set string
            • 307:30 - 308:00 8 that is uh Conta do set string 9 that is gender okay uh now we have added everything we just need to write pre dot
            • 308:00 - 308:30 execute update and that's it one more line I will write J option pin J option pin dot j option pin dot show message dialogue and
            • 308:30 - 309:00 null and the messages ticket booked successfully okay so ticket booked successfully now let's try to run and check whether
            • 309:00 - 309:30 ticket is booked successfully or not spend this book ticket uh with this note if ticket booked successfully then we have almost implemented the ticket ID function like sorry book The Dream ticket for you we have totally implemented this
            • 309:30 - 310:00 and why we are not getting Fe yeah now we are good now the customer 001 search
            • 310:00 - 310:30 customer calculate for three tickets 36 let's we don't have any discount so let's book and ticket book successfully let's go and check whether the ticket book successfully or not over the database so I have added one one ticket uh before by myself now let's yeah so TK 001 F 001 the ticket is booked
            • 310:30 - 311:00 successfully now it's fine so our this uh book ticket panel is working properly and we are getting an updated uh ticket ID as well so it is uh implemented successfully in the last video we have implemented this uh get ticket function so in this video we will uh implement the login credential okay this login button login uh page so for that what I want whenever
            • 311:00 - 311:30 someone write their username and password I would hit this login and whenever I will hit this login I should be able to log into the system and the authentication should be there like I need to check whether the user name and password is present in my database or not so for that we will check it like let's first hit like first let me check what's the name of the this variable so
            • 311:30 - 312:00 change it to username change this to the password okay and click over this go to this button event action action perform so right now we have just implemented these things so we will remove this because now we want to put a proper authentication so first of all we need
            • 312:00 - 312:30 username and password string username username name is equals to user name dot get text okay string password is equals to
            • 312:30 - 313:00 password do get text okay now uh we need to paste that particular thing the four line of code which we are uh putting everywhere so again
            • 313:00 - 313:30 to have a connection with the database we need to paste these line over here as well surround with TR and catch log add Clause okay now we are done with this now we want to search whether there's any customer in the database or not so for that we first need to use V
            • 313:30 - 314:00 is equals to con dot prepare statement okay and here we will write select customer select uh customer sorry select star from customer
            • 314:00 - 314:30 table where uh username sorry select star from admin admin where username is equals to this comma and password is equals to
            • 314:30 - 315:00 this and now let's set the string 3 do set string 1 comma username then three do set string
            • 315:00 - 315:30 two that is password and we are done with this now we will check if no first of all we need to have a result set in which we will store the result RS is equals to uh pre dot execute query and we have to
            • 315:30 - 316:00 import the SQL like dot result set and now we will check if rs. next rs. next is not equals to false then we will open our main frame so now we will create a main frame object main main is equals to new Main
            • 316:00 - 316:30 and this okay and we will set it visible true set visible true thereafter now this I want to uh set the visibility false of my login window so this dot set visibility
            • 316:30 - 317:00 FS okay now what if I don't have any of them so I will write J option pin dot show message dialog that is
            • 317:00 - 317:30 null null and I'll write a message that is admin credential admin credentials are or admin credentials are
            • 317:30 - 318:00 wrong and that's it now we can check it whether my login REM is working properly or not so let's check whether now I'm able to log in by hitting this login button or not so I'm not able to login it's giving me admin credentials are wrong let's write some credential that is uh what is the right
            • 318:00 - 318:30 credential we have added one okay so username is PC and password is 1 2 3 so PC and 1 2 3 4 5 let's login and we are able to log that means now our login button is working properly so with this note we are done with this project and it was a
            • 318:30 - 319:00 great uh meeting with you all you guys were awesome to till the end