/**
* @(#)password.java
*
*
* @author
* @version 1.00 2012/7/14
*/
import javax.swing.JOptionPane;
import javax.swing.*;
import java.util.*;
public class password {
public static void main (String[] args)
{
String user;
user=JOptionPane.showInputDialog("enter password to continue(letter only)");
if(user.compareTo("adnan"))
{
JOptionPane.showMessageDialog(null,"ACCES GRANTED","welcome",
JOptionPane.INFORMATION_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(null,"ACCES DENIED","error",
JOptionPane.ERROR_MESSAGE);
}
}
}
adnan18 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.