01-09-2013, 08:37 PM
Pretty much the same as my password program http://bpforums.info/viewtopic.php?f=23&...c0f07db121
[code2=java]import javax.swing.JOptionPane;
public class Codeword {
public static void PIN(){
String PIN = "2995";//This is the PIN
String input = (JOptionPane.showInputDialog("Insert PIN:"));// This is the question asked
if (input.equals(PIN)){
JOptionPane.showMessageDialog(null, "Access Granted");//If you get it right
JOptionPane.showMessageDialog(null, "This is the information:BLAH BLAH BLAH BLAH BLAH BLAH");//The information
}else{
JOptionPane.showMessageDialog(null, "Access Denied");//If you get it wrong nothing happends
}
}[/code2]
The PIN right now is 2995
[code2=java]import javax.swing.JOptionPane;
public class Codeword {
public static void PIN(){
String PIN = "2995";//This is the PIN
String input = (JOptionPane.showInputDialog("Insert PIN:"));// This is the question asked
if (input.equals(PIN)){
JOptionPane.showMessageDialog(null, "Access Granted");//If you get it right
JOptionPane.showMessageDialog(null, "This is the information:BLAH BLAH BLAH BLAH BLAH BLAH");//The information
}else{
JOptionPane.showMessageDialog(null, "Access Denied");//If you get it wrong nothing happends
}
}[/code2]
The PIN right now is 2995