In this video, we continue our modern Java Swing Flip Card project.
You will learn how to connect your Java application to a MySQL database and dynamically load employee data—such as image, name, phone, email, and department—directly into the flip card.
🔹 What you will learn in Part 2:
• Connect Java Swing to MySQL
• Use Connection, PreparedStatement, and ResultSet
• Fetch employee data from the database
• Display records inside the animated flip card
📌 Watch Part 1 (Design & Animation):
➡️ • Java Swing Flip Card UI | Modern Front & B...
JDBC Driver: https://dev.mysql.com/downloads/conne...
Database Scripts:
CREATE DATABASE Card_DB;
use Card_DB;
CREATE TABLE tblEmployee
(
employeeId INT,
name VARCHAR(64) NOT NULL,
phone VARCHAR(20) UNIQUE,
email VARCHAR(64) UNIQUE,
department VARCHAR(64),
imagePath VARCHAR(255)
);
INSERT INTO tblEmployee (employeeId, name, phone, email, department, imagePath) VALUES
(1, 'Ahmad Ahmadi', '+93 700 000 000', '[email protected]', 'IT Department', 'EmployeeImages\\Ahmad.jpg'),
(2, 'Ali Rahimi', '+93 700 000 001', '[email protected]', 'Finance', 'EmployeeImages\\ali.png'),
(3, 'Fatima Noor', '+93 700 000 002', '[email protected]', 'Management', 'EmployeeImages\\Fatima.jpg'),
(4, 'Jan Gul', '+93 700 000 003', '[email protected]', 'IT Department', 'EmployeeImages\\jan.jpg'),
(5, 'Khan Mohammad', '+93 700 000 004', '[email protected]', 'Security', 'EmployeeImages\\khan.jpg'),
(6, 'Obaidullah Kawsar', '+93 700 000 005', '[email protected]', 'IT Department', 'EmployeeImages\\Obaidullah.jpg'),
(7, 'Rana Sahar', '+93 700 000 006', '[email protected]', 'Design', 'EmployeeImages\\rana.jpg'),
(8, 'Abdul Basir', '+93 700 000 007', '[email protected]', 'Finance', 'EmployeeImages\\noImage.png'),
(9, 'Hameed Safi', '+93 700 000 008', '[email protected]', 'IT Department', 'EmployeeImages\\noImage.png'),
(10, 'Najeeb Khan', '+93 700 000 009', '[email protected]', 'HR Department', 'EmployeeImages\\noImage.png'),
(11, 'Rahila Sadaat', '+93 700 000 010', '[email protected]', 'Management', 'EmployeeImages\\noImage.png'),
(12, 'Samiullah Omar', '+93 700 000 011', '[email protected]', 'Finance', 'EmployeeImages\\noImage.png'),
(13, 'Maryam Naz', '+93 700 000 012', '[email protected]', 'IT Department', 'EmployeeImages\\noImage.png'),
(14, 'Javed Habib', '+93 700 000 013', '[email protected]', 'Security', 'EmployeeImages\\noImage.png'),
(15, 'Laila Mohseni', '+93 700 000 014', '[email protected]', 'HR Department', 'EmployeeImages\\noImage.png'),
(16, 'Farhad Azimi', '+93 700 000 015', '[email protected]', 'Management', 'EmployeeImages\\noImage.png'),
(17, 'Sabira Qaderi', '+93 700 000 016', '[email protected]', 'Design', 'EmployeeImages\\noImage.png'),
(18, 'Haroon Rashid', '+93 700 000 017', '[email protected]', 'Finance', 'EmployeeImages\\noImage.png'),
(19, 'Yasmin Karimi', '+93 700 000 018', '[email protected]', 'IT Department', 'EmployeeImages\\noImage.png'),
(20, 'Mirwais Jan', '+93 700 000 019', '[email protected]', 'HR Department', 'EmployeeImages\\noImage.png'),
(21, 'Sahar Gul', '+93 700 000 020', '[email protected]', 'Security', 'EmployeeImages\\noImage.png'),
(22, 'Nasirullah Faizi', '+93 700 000 021', '[email protected]', 'Management', 'EmployeeImages\\noImage.png'),
(23, 'Roqia Sultani', '+93 700 000 022', '[email protected]', 'Design', 'EmployeeImages\\noImage.png'),
(24, 'Kamaluddin Barak', '+93 700 000 023', '[email protected]', 'Finance', 'EmployeeImages\\noImage.png'),
(25, 'Freshta Jalali', '+93 700 000 024', '[email protected]', 'IT Department', 'EmployeeImages\\noImage.png'),
(26, 'Mahmood Sediqi', '+93 700 000 025', '[email protected]', 'HR Department', 'EmployeeImages\\noImage.png'),
(27, 'Latifa Hashimi', '+93 700 000 026', '[email protected]', 'Management', 'EmployeeImages\\noImage.png'),
(28, 'Qais Ahmadzai', '+93 700 000 027', '[email protected]', 'Design', 'EmployeeImages\\noImage.png'),
(29, 'Shabana Fahem', '+93 700 000 028', '[email protected]', 'Finance', 'EmployeeImages\\noImage.png'),
(30, 'Rashid Wahidi', '+93 700 000 029', '[email protected]', 'IT Department', 'EmployeeImages\\noImage.png');
Presented By: Kawsar Technologies
If you find this video helpful, please Like, Share, and Subscribe for more Java, Swing, MySQL, and UI Design tutorials.