This is a simple Banking Application that provides a user-friendly Graphical User Interface (GUI) for managing basic banking operations like deposits, withdrawals, balance checks, and viewing the previous transaction.
- Deposit Money: Users can add money to their account.
- Withdraw Money: Users can withdraw money from their account.
- Check Balance: Displays the current account balance.
- View Previous Transaction: Shows the last transaction (Deposit/Withdrawal).
- Exit Option: Safely exits the application.
- User-Friendly GUI: The interface is intuitive, built with Java Swing.
- Java: Core programming language.
- Swing: For building the graphical user interface.
- JOptionPane: For input dialogs and pop-up messages.
-
Welcome Screen:
- Users are prompted to enter their name and customer ID at the start.
-
Main GUI:
- Buttons to Deposit, Withdraw, Check Balance, and more.
The project consists of the following key files:
BankingApplication/
└── bankingapplication/
│ ├── BankAccount.java
│ ├── BankAccountGUI.java
│ ├── DatabaseConnection.java
│
└── README.md
Follow these steps to set up and run the application:
- Prerequisites
- Java Development Kit (JDK): Version 8 or above.
- An IDE (e.g., IntelliJ IDEA, Eclipse, or NetBeans) or a terminal for compilation.
- Clone the Repository
- If you’re using Git, clone the repository:
git clone https://github.com/stephenombuya/bankingapplication/tree/main
cd BankingApplication- Alternatively, download the project as a ZIP file and extract it.
- Compile the Project
- Open the project in your IDE or compile it manually:
javac src/bankingApplication/BankAccountGUI.java- Run the Project Execute the compiled class:
java bankingApplication.BankAccountGUI- Follow the Instructions
- Enter your name and customer ID when prompted.
- Use the buttons in the GUI to perform banking operations.
- Interface Components:
- Welcome Label: Displays the user’s name and ID.
- Text Field: Enter the amount for deposits/withdrawals.
- Buttons:
- Deposit: Adds the entered amount to your balance.
- Withdraw: Deducts the entered amount (if sufficient) from your balance.
- Check Balance: Displays the current balance in a dialog box.
- Previous Transaction: Shows the most recent transaction.
- Exit: Closes the application safely.
The application includes error handling for:
- Invalid inputs (e.g., non-numeric amounts).
- Withdrawals exceeding the available balance.
- Negative amounts for deposits or withdrawals.
- Add file storage to save transaction history persistently.
- Implement user authentication with a login screen.
- Support for multiple accounts in the same session.
- Use a database (e.g., MySQL) to store user data securely.
Contributions are welcome! If you want to improve this project:
- Fork the repository.
- Create a new branch (feature-branch).
- Commit your changes and submit a Pull Request.
This project is licensed under the Apache 2.0 License. You are free to use, modify, and distribute it as long as proper credit is given.
Enjoy using the Banking Application! If you face any issues, feel free to open an issue in the repository. 😊