From f343251190b2241cd5d4ca9ca95bca5e3c0d3cd2 Mon Sep 17 00:00:00 2001 From: Alina Zacaria Date: Fri, 29 Nov 2024 20:02:58 -0600 Subject: [PATCH] created login class --- LogIn.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 LogIn.java diff --git a/LogIn.java b/LogIn.java new file mode 100644 index 0000000..0146919 --- /dev/null +++ b/LogIn.java @@ -0,0 +1,22 @@ +import javax.swing.*; + +public class LogIn { + public Guest logIn() { + try {UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");} + catch (Exception e) {System.out.println("Look and Feel not set");} + + LoginPage loginPage = new LoginPage(null); + Guest guest = loginPage.guest; + + if(guest != null) { + System.out.println("\n\t" + + guest.getName() + + "\n\tID: " + guest.id_number + + "\n\tPassword: " + guest.password + + "\n\tStatus: " + guest.guest_status); + }else{ + System.out.println("Authentication Cancelled"); + } + return guest; + } +} \ No newline at end of file