Java GUI Lab
Java GUI Lab
The goal of this exercise is to create a Java Swing application with two GUI screens.
Functionality:
Login Screen:
CS202 Spring2025
• When the "Login" button is clicked, check if the username and password are both
non-empty.
• If valid, hide the Login Screen and display the Welcome Screen with a greeting
message.
• If either field is empty, display an error message using a JOptionPane.
• The "Exit" button should close the application.
Welcome Screen:
• The "Logout" button should hide the Welcome Screen and redisplay the Login
Screen.