A comprehensive JavaFX desktop application for managing airline operations including flight management, passenger registration, ticket booking, and payment processing. The system features a French-language interface and provides complete CRUD operations for all airline management needs.
- Features
- Technology Stack
- System Architecture
- Database Schema
- Installation
- Usage
- Screenshots
- Project Structure
- Configuration
- Contributing
- License
- Secure login with MySQL database validation
- Admin authentication against
admin
table - Session management and security controls
- Add Flights (
AjouteVol
): Create new flights with complete details- Flight ID, name, source, and destination
- Departure and arrival times
- Available seats and fare pricing
- Departure date scheduling
- Modify Flights (
ModifierVol
): Update and delete existing flights- Search functionality for flight management
- Real-time flight information updates
- Seat capacity management
- Register Passengers (
AjtVoyageur
): Comprehensive passenger registration- Passport ID validation
- Personal details (name, age, contact information)
- Address and contact management
- Update Passengers (
UpdateVoyageur
): Modify passenger records- Edit personal information
- Update contact details
- Delete passenger records
- Book Tickets (
ReservationTicket
): Complete booking workflow- Flight selection from available options
- Passenger assignment to flights
- Payment processing (cash/card)
- Automatic seat allocation
- Reservation confirmation
- Ticket Details (
TicketDetails
): Retrieve and display ticket information- Search by ticket number
- Complete booking information display
- Passenger and flight details
- Flight Listings by Date (
ListeVol_dateDepart
): Filter flights by departure date - Flight Search (
ListeVol_Source_Dep
): Search flights by source and destination - Ticket Reports (
ListeTicket_dateDepart
): Generate ticket reports with date filtering - Real-time data visualization
- Multiple payment methods support (cash/card)
- Secure payment validation
- Transaction history tracking
- Payment confirmation system
- Java 21.0.2: Primary programming language
- JavaFX 19: Desktop application framework
- FXML: User interface markup
- CSS: Custom styling and themes
- MySQL 8.0+: Primary database management system
- JDBC: Database connectivity
- PreparedStatement: SQL injection prevention
- Eclipse IDE: Recommended development environment
- Scene Builder: FXML visual editor
- JavaFX Maven Plugin: Build and deployment
The application follows the Model-View-Controller (MVC) pattern:
Vol.java
: Flight data modelTicketListe.java
: Ticket display model- Database entity models
- Login.fxml: Authentication interface
- Home.fxml: Main dashboard
- AjouteVol.fxml: Flight creation form
- ModifierVol.fxml: Flight management interface
- AjtVoyageur.fxml: Passenger registration
- UpdateVoyageur.fxml: Passenger management
- ReservationTicket.fxml: Ticket booking interface
- TicketDetails.fxml: Ticket information display
- ListeVol_dateDepart.fxml: Flight listings by date
- ListeVol_Source_Dep.fxml: Flight search interface
- ListeTicket_dateDepart.fxml: Ticket reports
- LoginController.java: Authentication logic
- HomeController.java: Dashboard navigation
- AjouteVolController.java: Flight creation
- ModifierVolController.java: Flight management
- AjtVoyageurController.java: Passenger registration
- UpdateVoyageurController.java: Passenger management
- ReservationTicketController.java: Booking system
- TicketDetailsController.java: Ticket display
- ListeVol_dateDepartController.java: Flight reports
- ListeVol_Source_DepController.java: Flight search
- ListeTicket_dateDepartController.java: Ticket analytics
Connection Details:
- Host:
localhost
- Database:
airliners
- User:
root
- Password: (empty)
CREATE TABLE admin (
UserName VARCHAR(50) PRIMARY KEY,
Password VARCHAR(255) NOT NULL
);
CREATE TABLE vol (
vol_ID VARCHAR(20) PRIMARY KEY,
vol_nom VARCHAR(100) NOT NULL,
source VARCHAR(100) NOT NULL,
destination VARCHAR(100) NOT NULL,
heure_depart TIME NOT NULL,
heure_arrivee TIME NOT NULL,
nbr_place INT NOT NULL,
vol_frais DECIMAL(10,2) NOT NULL,
date_depart DATE NOT NULL
);
CREATE TABLE passager (
passport_ID VARCHAR(20) PRIMARY KEY,
nom VARCHAR(100) NOT NULL,
prenom VARCHAR(100) NOT NULL,
age INT NOT NULL,
adresse TEXT,
telephone VARCHAR(20),
email VARCHAR(100)
);
CREATE TABLE ticket (
ticket_num VARCHAR(20) PRIMARY KEY,
passport_ID VARCHAR(20),
vol_ID VARCHAR(20),
date_reservation DATE NOT NULL,
payment_method ENUM('cash', 'card'),
total_amount DECIMAL(10,2),
FOREIGN KEY (passport_ID) REFERENCES passager(passport_ID),
FOREIGN KEY (vol_ID) REFERENCES vol(vol_ID)
);
CREATE TABLE paiement (
payment_ID INT AUTO_INCREMENT PRIMARY KEY,
ticket_num VARCHAR(20),
card_number VARCHAR(20),
card_holder VARCHAR(100),
amount DECIMAL(10,2),
payment_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (ticket_num) REFERENCES ticket(ticket_num)
);
- Java 21.0.2 or higher
- JavaFX 19 or higher
- MySQL 8.0 or higher
- Eclipse IDE (recommended)
- Install MySQL Server
- Create database:
CREATE DATABASE airliners;
USE airliners;
-
Import the database schema (create tables as shown above)
-
Create default admin user:
INSERT INTO admin (UserName, Password) VALUES ('admin', 'admin123');
- Clone the repository:
git clone https://github.com/souilimaa/Airline-management-System.git
cd Airline-management-System
-
Open project in Eclipse IDE
-
Configure JavaFX:
- Add JavaFX library to project build path
- Set VM arguments:
--module-path /path/to/javafx/lib --add-modules javafx.controls,javafx.fxml
-
Update database connection:
- Modify connection parameters in controller classes if needed
- Default:
localhost:3306/airliners
withroot
user
-
Build and run:
- Right-click project β Run As β Java Application
- Select
Main
class as entry point
- Login: Start with admin credentials
- Dashboard: Navigate through main menu options
- Flight Management: Add, modify, or search flights
- Passenger Registration: Register new passengers
- Booking: Create ticket reservations
- Reports: Generate flight and ticket reports
- Navigate to "Ajouter Vol" (Add Flight)
- Fill in flight details:
- Flight ID and name
- Source and destination airports
- Departure and arrival times
- Number of seats available
- Flight fare
- Departure date
- Save flight information
- Go to "RΓ©servation Ticket" (Ticket Reservation)
- Select passenger (register if new)
- Choose available flight
- Select payment method (cash/card)
- Process payment
- Generate ticket confirmation
- Use "Ajouter Voyageur" (Add Passenger) for new registrations
- Use "Modifier Voyageur" (Update Passenger) for modifications
- Provide complete passenger information including passport details
- User authentication screen
- Clean, professional design
- Security validation
- Central navigation hub
- Module access buttons
- System overview
- Add/edit flight forms
- Flight search and filtering
- Real-time availability
- Registration forms
- Passenger search
- Contact management
- Interactive booking process
- Payment processing
- Confirmation generation
- Flight listings
- Ticket reports
- Date-based filtering
Airline-management-System-main/
βββ src/
β βββ application/
β β βββ Main.java # Application entry point
β β βββ LoginController.java # Authentication logic
β β βββ HomeController.java # Dashboard controller
β β βββ AjouteVolController.java # Flight creation
β β βββ ModifierVolController.java # Flight management
β β βββ AjtVoyageurController.java # Passenger registration
β β βββ UpdateVoyageurController.java # Passenger management
β β βββ ReservationTicketController.java # Ticket booking
β β βββ TicketDetailsController.java # Ticket display
β β βββ ListeVol_dateDepartController.java # Flight reports
β β βββ ListeVol_Source_DepController.java # Flight search
β β βββ ListeTicket_dateDepartController.java # Ticket reports
β β βββ Vol.java # Flight model
β β βββ TicketListe.java # Ticket model
β β βββ Login.fxml # Login UI
β β βββ Home.fxml # Dashboard UI
β β βββ AjouteVol.fxml # Add flight UI
β β βββ ModifierVol.fxml # Modify flight UI
β β βββ AjtVoyageur.fxml # Add passenger UI
β β βββ UpdateVoyageur.fxml # Update passenger UI
β β βββ ReservationTicket.fxml # Ticket booking UI
β β βββ TicketDetails.fxml # Ticket details UI
β β βββ ListeVol_dateDepart.fxml # Flight list UI
β β βββ ListeVol_Source_Dep.fxml # Flight search UI
β β βββ ListeTicket_dateDepart.fxml # Ticket list UI
β β βββ application.css # Custom styles
β βββ module-info.java # Module configuration
βββ bin/ # Compiled classes
βββ build.fxbuild # JavaFX build config
βββ README.md # This file
Update database connection parameters in controller classes:
// Database connection settings
private static final String DB_URL = "jdbc:mysql://localhost:3306/airliners";
private static final String DB_USER = "root";
private static final String DB_PASSWORD = "";
Ensure JavaFX modules are properly configured in module-info.java
:
module Airline_RS {
requires javafx.controls;
requires java.sql;
requires javafx.fxml;
requires java.desktop;
requires javafx.base;
requires javafx.graphics;
opens application to javafx.graphics, javafx.fxml, javafx.base;
}
Customize appearance in application.css
:
- Blue/green theme
- Hover effects
- Professional design elements
- Follow JavaFX best practices
- Maintain MVC architecture
- Add proper error handling
- Include comprehensive comments
- Test database operations thoroughly
Solution: Add JavaFX to module path
--module-path /path/to/javafx/lib --add-modules javafx.controls,javafx.fxml
Solution: Verify MySQL service and connection parameters
- Check MySQL service status
- Verify database name and credentials
- Ensure port 3306 is accessible
Solution: Check FXML file paths and controller references
- Verify FXML files are in correct package
- Check fx:controller attributes
- Ensure proper imports
Project Link: https://github.com/souilimaa/Airline-management-System
Note: This is a educational project demonstrating JavaFX desktop application development with database integration. The system provides a comprehensive foundation for airline management operations with room for enhancement and customization.