JXDOS
Oct 21st, 2006, 07:16 AM
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..
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")
}
}
}
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..
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")
}
}
}