Java Bank is a personal banking application built in Java with a graphical user interface (GUI). It allows users to create an account, log in, perform deposits and withdrawals, and track their account balance in real-time. The application is designed as a personal project and includes essential banking functionalities.
- 🔐 User Authentication - Register and log in securely.
- 💰 Deposit & Withdrawal - Perform transactions and update the account balance instantly.
- 📊 Real-Time Balance Updates - View the latest balance changes.
- 🖼 Customizable UI - Configure background images for different windows.
- 📂 MySQL Database Support - Store user data securely.
⚠️ Exception Handling - Handles common banking operation errors gracefully.- 🔄 Transaction Logging - Track and store all user transactions.
- Java (Swing for GUI)
- MySQL (Database Management)
- JDBC (Database Connection)
- Install Java JDK (8 or higher)
- Install MySQL Server & Workbench
- Set up JDBC Driver for MySQL
- Create a MySQL database:
CREATE DATABASE java_bank;
- Create a
userstable:CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(50) UNIQUE NOT NULL, password VARCHAR(255) NOT NULL, balance DECIMAL(10,2) DEFAULT 0.00 );
- Create a
transactionstable:CREATE TABLE transactions ( id INT AUTO_INCREMENT PRIMARY KEY, user_id INT NOT NULL, transaction_type VARCHAR(50) NOT NULL, transaction_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, transaction_amount DECIMAL(10,2) NOT NULL, FOREIGN KEY (user_id) REFERENCES users(id) );
- Update the database connection in the Java code:
String url = "jdbc:mysql://localhost:3306/java_bank"; String user = "your_username"; String password = "your_password";
- Clone this repository:
git clone https://github.com/Stevanovic-Milos/Java-bank.git cd Java-bank - Configure the database connection in the code.
- Set your image file paths for backgrounds.
- Compile and run the application:
cd src javac Main.java java Main
- 📱 Responsive UI - Improve layout adaptability.
- 📩 Email Notifications - Notify users on transactions.
- 📊 Transaction History - Track past transactions.
- 🔑 Two-Factor Authentication - Enhance security.
- 🔄 Automated Reports - Generate financial reports.
👨💻 Developed by Stevanovic