A simple desktop Login Screen application built using Java AWT (Abstract Window Toolkit) that demonstrates GUI programming, event handling, and custom exception handling in Java.
- GUI-based login form with Username and Password fields
- Password masking (characters hidden with
*) - Custom Exception class (
LoginException) for invalid login handling - 3 login attempts limit β login button disables after all attempts are exhausted
- Clear button to reset input fields
- Window close handler using
WindowAdapter
| Technology | Usage |
|---|---|
| Java | Core programming language |
| Java AWT | GUI components (Frame, Label, TextField, Button) |
| OOP Concepts | Custom Exception, Event Handling |
- Java JDK 8 or above installed
- Any Java IDE (IntelliJ IDEA, Eclipse, NetBeans) or terminal
# 1. Clone the repository
git clone https://github.com/DEV7040/Mini-Project.git
# 2. Navigate to the project folder
cd Mini-Project
# 3. Compile the Java file
javac LoginScreen.java
# 4. Run the program
java LoginScreen- Enter the same text in both Username and Password fields to login successfully
- If credentials don't match, a
LoginExceptionis thrown and attempts decrease - After 3 failed attempts, the login button is permanently disabled
- Use the Clear button to reset all fields at any time
Mini-Project/
β
βββ LoginScreen.java # Main Java source file
βββ README.md # Project documentation
- Java AWT GUI β Building desktop UI without Swing or JavaFX
- Custom Exception Handling β
LoginExceptionextendsException - Event-Driven Programming β
ActionListenerinterface implementation - GridLayout β Organizing components in a grid
- WindowAdapter β Handling window close events
Devesh Gujarathi
B.Tech Computer Engineering β SNJB's Late Sau. K.B. Jain College of Engineering, Chandwad
GitHub: @DEV7040
This project is open source and available under the MIT License.