hi all.
I am new to java and i want to make a message text box asking for the pass word. if the password is correct then messagebox title and text = welcome else = access denied
this is what i have put together myself but it doesn't work..
Code:import javax.swing.JOptionPane; public class Password { public static void main(String args[]) { String name = JOptionPane.showInputDialog("Password?"); if: { raw_input = "hello"; String message = String.format("Welcome"); JOptionPane.showMessageDialog("Welcome"); } else: { String message = String.format("Access Denied"); JOptionPane.showMessageDialog("Access Denied") } } }




If my post has been helpful, please rate it!
Reply With Quote