A professional Java-based Bank Management Application built with Swing GUI and MySQL database. This application provides comprehensive banking operations including customer management, account management, and transaction processing.
This Bank Management System is a desktop application designed for bank tellers and administrators to manage customer accounts, process transactions, and maintain banking records. The application follows enterprise-level design patterns and best practices for maintainability and scalability.
- Create New Account: Register new customers with comprehensive personal information
- Modify Customer: Update customer details and information
- Delete Customer: Remove customers and associated accounts (with confirmation)
- View All Customers: Browse and search through all registered customers
- Account Creation: Create savings or current accounts with various options
- Account Types: Support for Savings and Current accounts
- Account Services: Enable/disable SMS alerts, Internet Banking, and ATM cards
- Account Modes: Self-operated or Joint account options
- Deposit: Deposit money into accounts with transaction recording
- Withdraw: Withdraw money from accounts with balance validation
- Transfer: Transfer funds between accounts with automatic transaction logging
- Balance Inquiry: Check account balance and details
- Account Statement: View complete transaction history for any account
- User Authentication: Secure login system with username and password
- Role-Based Access: Support for different user roles (Admin, Teller)
- Database Security: Prepared statements to prevent SQL injection
The application follows the MVC (Model-View-Controller) architecture pattern combined with DAO (Data Access Object) pattern for clean separation of concerns:
-
Model Layer (
com.bankmanagement.model)Customer: Represents customer informationAccount: Represents bank account detailsTransaction: Represents financial transactionsUser: Represents system users for authentication
-
DAO Layer (
com.bankmanagement.dao)CustomerDAO: Handles all customer-related database operationsAccountDAO: Manages account database operationsTransactionDAO: Handles transaction database operationsUserDAO: Manages user authentication database operations
-
Controller Layer (
com.bankmanagement.controller)BankController: Contains business logic for banking operationsAuthController: Handles authentication logic
-
View Layer (
com.bankmanagement.view)LoginView: User authentication interfaceMainView: Main application window with menu systemNewAccountView: Customer account creation interfaceDepositView,WithdrawView,TransferView: Transaction interfacesBalanceView,StatementView: Account inquiry interfacesModifyCustomerView,DeleteCustomerView,ViewCustomersView: Customer management interfaces
-
Utility Layer (
com.bankmanagement.util)DatabaseConnection: Singleton pattern for database connection management
- Singleton Pattern: Database connection management
- DAO Pattern: Data access abstraction
- MVC Pattern: Separation of business logic, data, and presentation
- Factory Pattern: Object creation through controllers
- Language: Java 11+
- GUI Framework: Java Swing
- Database: MySQL 8.0+
- Build Tool: Maven
- JDBC: MySQL Connector/J 8.0.33
- Testing: JUnit 5 (optional)
Before running the application, ensure you have the following installed:
-
Java Development Kit (JDK) 11 or higher
- Download from Oracle JDK or OpenJDK
- Verify installation:
java -version
-
MySQL Server 8.0 or higher
- Download from MySQL Official Website
- Ensure MySQL service is running
-
Maven 3.6 or higher
- Download from Maven Official Website
- Verify installation:
mvn -version
-
IDE (Optional but recommended)
- IntelliJ IDEA
- Eclipse
- NetBeans
- VS Code with Java extensions
git clone <repository-url>
cd manaBank-
Start MySQL Server
# On Windows net start MySQL80 # On Linux/Mac sudo systemctl start mysql
-
Create Database and Tables
- Open MySQL command line or MySQL Workbench
- Run the SQL script located at
src/main/resources/database_schema.sql:
mysql -u root -p < src/main/resources/database_schema.sqlOr execute the SQL file manually in MySQL Workbench.
-
Verify Database Creation
USE bankmanagement; SHOW TABLES;
Update the database connection settings in src/main/java/com/bankmanagement/util/DatabaseConnection.java if needed:
private static final String DB_URL = "jdbc:mysql://localhost:3306/bankmanagement";
private static final String DB_USER = "root";
private static final String DB_PASSWORD = "your_password"; // Update with your MySQL passwordUsing Maven command line:
# Clean and compile
mvn clean compile
# Package the application
mvn clean packageOption 1: Using Maven
mvn exec:java -Dexec.mainClass="com.bankmanagement.BankManagementApp"Option 2: Using IDE
- Import the project as a Maven project
- Run
BankManagementApp.javaas the main class
Option 3: Using Java Command
# After building with Maven
java -cp target/classes:target/dependency/* com.bankmanagement.BankManagementAppThe application comes with default user accounts:
| Username | Password | Role |
|---|---|---|
| admin | admin123 | ADMIN |
| teller | teller123 | TELLER |
- users: System user accounts for authentication
- customers: Customer personal information
- accounts: Bank account details
- transactions: Transaction records
customersβaccounts(One-to-Many)accountsβtransactions(One-to-Many)transactionsβaccounts(Foreign key for transfer transactions)
manaBank/
βββ src/
β βββ main/
β β βββ java/
β β β βββ com/
β β β βββ bankmanagement/
β β β βββ model/ # Model classes
β β β βββ dao/ # Data Access Objects
β β β βββ controller/ # Business logic controllers
β β β βββ view/ # GUI views
β β β βββ util/ # Utility classes
β β β βββ BankManagementApp.java # Main entry point
β β βββ resources/
β β βββ database_schema.sql # Database schema
β βββ test/
β βββ java/ # Test classes (optional)
βββ pom.xml # Maven configuration
βββ README.md # This file
Modify database connection parameters in DatabaseConnection.java:
private static final String DB_URL = "jdbc:mysql://localhost:3306/bankmanagement";
private static final String DB_USER = "root";
private static final String DB_PASSWORD = "";- Default database:
bankmanagement - Default port:
3306 - Connection timeout: Configurable in
DatabaseConnection.java
Run unit tests (if available):
mvn test-
Database Connection Failed
- Verify MySQL service is running
- Check database credentials in
DatabaseConnection.java - Ensure database
bankmanagementexists - Verify MySQL port (default: 3306)
-
ClassNotFoundException: com.mysql.cj.jdbc.Driver
- Ensure MySQL Connector/J dependency is included in
pom.xml - Run
mvn clean installto download dependencies
- Ensure MySQL Connector/J dependency is included in
-
GUI Not Displaying
- Verify Java version (Java 11+ required)
- Check for display issues on Linux:
export DISPLAY=:0
-
Build Errors
- Clean Maven cache:
mvn clean - Update Maven dependencies:
mvn dependency:resolve - Verify Java version matches Maven configuration
- Clean Maven cache:
-
Enhanced Security
- Password encryption (BCrypt)
- Session management
- Audit logging
-
Advanced Features
- Loan management system
- Interest calculation
- Report generation (PDF/Excel)
- Email notifications
- Multi-branch support
-
User Interface
- Modern UI theme
- Responsive design improvements
- Data visualization charts
- Export functionality
-
Testing
- Comprehensive unit tests
- Integration tests
- UI automation tests
-
Performance
- Connection pooling
- Caching mechanisms
- Database query optimization
-
Documentation
- API documentation
- User manual
- Developer guide
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
Developed as a professional Java application demonstrating enterprise-level design patterns and best practices.
- Java Swing framework for GUI development
- MySQL for robust database management
- Maven for dependency management and build automation
For issues, questions, or contributions, please open an issue in the repository.
Note: This application is for educational and demonstration purposes. For production use, implement additional security measures, error handling, and compliance with banking regulations.