A comprehensive ATM simulation application built with Java Swing GUI and SQLite database, designed to demonstrate core banking operations in a desktop environment.
video.mp4
This project implements a fully functional Bank Management System that simulates ATM operations. Users can create accounts, log in, and perform various banking transactions through an intuitive graphical interface. The system uses SQLite for persistent data storage, ensuring data integrity and portability.
- Educational: Demonstrates Java GUI development, database integration, and secure coding practices
- Functional: Provides a working ATM simulation for testing banking workflows
- Scalable: Modular design allows easy addition of new features
- Language: Java (JDK 11+)
- GUI Framework: Swing (AWT components)
- Database: SQLite with JDBC driver
- Build Tool: Manual compilation with
javac - Platform: Cross-platform (Windows/Linux/Mac with adjustments)
- Multi-step Signup: 3-stage registration process collecting personal, additional, and account details
- Secure Login: Card number + PIN authentication
- Account Types: Savings, Current, etc.
- Deposit: Add funds to account with transaction logging
- Withdrawal: Withdraw cash with balance validation
- Fast Cash: Quick withdrawal options (₹100, ₹500, ₹1000, ₹2000, ₹5000, ₹10000)
- Balance Inquiry: Check current account balance
- PIN Change: Update account PIN securely
- Mini Statement: View recent transactions
- Prepared Statements: SQL injection prevention
- Input Validation: Form validation and error handling
- Session Management: Proper login/logout flow
- Responsive GUI: Clean, professional interface with icons
- Error Handling: Graceful failure with user-friendly messages
- Fallback UI: Works without images if resources unavailable
- Model: Database layer (
Connn.java) handles data persistence - View: Swing components in each form class
- Controller: Event handlers in each JFrame class
- Centralized connection management
- Auto-table creation on first run
- Transaction logging for audit trail
- Modular form design (each operation = separate class)
- Shared utilities (
ImageUtil.javafor icon loading) - Consistent styling and layout
Signup Flow: Signup → Signup2 → Signup3 → Login
Main Flow: Login → main_Class → [Operations] → Logout
Operations: Deposit | Withdrawl | FastCash | BalanceEnquriy | Pin | mini
The system uses 5 core tables with proper relationships:
-
signup- Personal Information- Stores basic user details (name, address, contact)
- Primary key:
formno(application number)
-
Signuptwo- Additional Details- Extended profile info (religion, income, occupation)
- Linked by
formnoto signup table
-
signupthree- Account Creation- Final account setup (card number, PIN, services)
- Generates login credentials
-
login- Authentication- Active login credentials (card + PIN)
- Primary key:
card_number
-
bank- Transaction Log- All financial transactions
- Audit trail with timestamps
- Normalization: Data split across related tables
- Referential Integrity: Foreign key relationships via formno/card_number
- Audit Trail: Every transaction logged
- Security: PINs stored as text (demo purposes; hash in production)
bank.management.system/
├── Connn.java # Database connection & schema management
├── Login.java # Authentication screen
├── Signup.java # Personal info form
├── Signup2.java # Additional details form
├── Signup3.java # Account creation form
├── main_Class.java # Main menu after login
├── Deposit.java # Deposit transaction
├── Withdrawl.java # Withdrawal transaction
├── FastCash.java # Quick cash options
├── BalanceEnquriy.java # Balance check
├── Pin.java # PIN change
├── mini.java # Mini statement
└── ImageUtil.java # Icon loading utility
- Singleton connection pattern
- Auto-creates tables on first run
- Provides prepared statement helpers
- Handles connection lifecycle
- Each extends
JFrameand implementsActionListener - Follow consistent structure: constructor sets up UI, actionPerformed handles events
- Use
ImageUtil.loadIcon()for safe image loading - Database operations wrapped in try-catch
ImageUtil: Centralized icon management with null-safe loading- Prevents code duplication and handles missing resources gracefully
- Factory Pattern: Database connections via
Connn.getConnection() - Observer Pattern: Swing event handling
- Strategy Pattern: Different transaction types
- Singleton Pattern: Database connection management
- Run the application using
run.bat - First time: Create account via Signup process
- Login with generated card number and PIN
- Signup: Enter personal details (name, DOB, address, etc.)
- Signup2: Additional info (religion, income, occupation, PAN, Aadhar)
- Signup3: Account type selection and service preferences
- System generates card number and PIN
- Login: Enter card number and PIN
- Main Menu: Choose from available operations
- Transactions: Follow on-screen prompts
- Logout: Return to login screen
- Deposit: Enter amount, confirm
- Withdraw: Enter amount (max ₹10,000), confirm
- Fast Cash: Select preset amount
- Balance: View current balance
- PIN Change: Enter old PIN, set new PIN
- Mini Statement: View last transactions
- Uses PreparedStatement for SQL security
- Proper exception handling
- Consistent naming conventions
- Modular class design
- Single-user simulation (no concurrent access handling)
- PIN stored in plain text (demo only)
- No encryption for sensitive data
- Basic UI without advanced styling
- Add user session management
- Implement transaction limits
- Add account transfer functionality
- Integrate with real banking APIs
- Add admin panel for account management
- Implement proper password hashing
- Add transaction categories and filtering
src/bank/management/system: Java source fileslib: SQLite JDBC driver should be placed hereclasses: compiled.classfiles (generated at build)run.bat: full build + run script for Windowsbank.db: runtime SQLite database file (auto-created)
- Java JDK installed (11+, recommended 21)
- Windows (works as-is); Linux/Mac needs path adjustments in
run.bator manual commands - Internet access to download JDBC JAR if not already available
- Verify Java:
java -versionjavac -version
- Run:
cd "C:\Users\nites\Downloads\Bank-Management-System--master" run.bat
- Or double-click
Run Bank App.bat(copy to desktop for easy access)
- Or double-click
- Checks Java installation
- Auto-downloads SQLite JDBC jar to
lib/if missing - Compiles Java files from
src/bank/management/systemintoclasses - Runs
bank.management.system.LoginGUI - Produces console output for errors/warnings
- Signup:
Signup->Signup2->Signup3(collects personal, additional, account info) - Login:
Loginscreen uses card + PIN fromsignupthreeandlogintables - Main:
main_Classmenu opens operations - Operations:
Deposit,Withdrawl,FastCash,BalanceEnquriy,Pin,mini - Actions write entries into
banktable and update account info vialoginandsignupthree
- DB connection management is centralized in
Connn.java:- opens
jdbc:sqlite:bank.db - auto-creates tables with
CREATE TABLE IF NOT EXISTS
- opens
- SQL statements use
PreparedStatementwhere possible (hardening against injection) - GUI icons in
ImageUtil.javaare loaded safely, with fallback to plain labels if resources are missing - The app uses Swing and event handles to avoid locking UI with database operations
login(card_number TEXT PRIMARY KEY, pin TEXT)signup(formno TEXT PRIMARY KEY, name TEXT, fname TEXT, dob TEXT, gender TEXT, email TEXT, marital TEXT, address TEXT, city TEXT, pincode TEXT, state TEXT)Signuptwo(formno TEXT PRIMARY KEY, religion TEXT, category TEXT, income TEXT, education TEXT, occupation TEXT, pan TEXT, aadhar TEXT, senior_citizen TEXT, existing_account TEXT)signupthree(formno TEXT PRIMARY KEY, account_type TEXT, card_number TEXT, pin TEXT, services TEXT)bank(pin TEXT, date TEXT, type TEXT, amount TEXT)
- Stop app
- Delete
bank.dbfile - Re-run
run.batto recreate tables
no such table: deletebank.dband restartJAR not found: confirmlib\sqlite-jdbc-*.jarNullPointerExceptionon icon load: this is tolerated with fallback image-free UIPreparedStatementnot found compile error: ensure importjava.sql.*exists in classes using DB queries (already inConnn,Withdrawl,mini)
- Use
javacwith-Xlint:uncheckedand-Xlint:deprecationto find warnings - Keep connection/statement/result set close in
finallyblocks (ortry-with-resources) if expanding functionality
Add to .gitignore:
bank.dbclasses/*.log
- Add password/PIN hash (instead of plain text)
- Add transaction history UI with filters
- Add account transfer between accounts
- Add JUnit tests for DAO operations and validation rules
cd "C:\Users\nites\Downloads\Bank-Management-System--master"
run.bat- If
run.batfails, run manual commands:javac -d classes -cp lib/sqlite-jdbc-3.51.3.0.jar src\bank\management\system\*.javajava -cp "classes;lib/sqlite-jdbc-3.51.3.0.jar" bank.management.system.Login
