import java.util.LinkedList;
import java.util.Scanner;
import javax.swing.JOptionPane;
public class Aaa{
public static void main(String[] args) {
Aaa t=new Aaa();
t.denglu();
}
public static void denglu() {
String Zhanghao, Mima, W;
Zhanghao = JOptionPane.showInputDialog("输入账号:");
if (Zhanghao.equals("123456")) {
Mima = JOptionPane.showInputDialog("输入密码:");
if (Mima.equals("123456")) {
int yanzhengma = (int) (Math.random() * 10000);
W = JOptionPane.showInputDialog("输入验证码:"+yanzhengma);
String s=Integer.toString(yanzhengma);
if(W.equals(s))
{
JOptionPane.showMessageDialog(null, "登录成功!");
open();
}
else {
JOptionPane.showMessageDialog(null, "验证码错误");
}
}else {
JOptionPane.showMessageDialog(null, "密码错误");
}
}
else {
JOptionPane.showMessageDialog(null, "无此账号记录");
}
}
import java.util.Scanner;
import javax.swing.JOptionPane;
public class Aaa{
public static void main(String[] args) {
Aaa t=new Aaa();
t.denglu();
}
public static void denglu() {
String Zhanghao, Mima, W;
Zhanghao = JOptionPane.showInputDialog("输入账号:");
if (Zhanghao.equals("123456")) {
Mima = JOptionPane.showInputDialog("输入密码:");
if (Mima.equals("123456")) {
int yanzhengma = (int) (Math.random() * 10000);
W = JOptionPane.showInputDialog("输入验证码:"+yanzhengma);
String s=Integer.toString(yanzhengma);
if(W.equals(s))
{
JOptionPane.showMessageDialog(null, "登录成功!");
open();
}
else {
JOptionPane.showMessageDialog(null, "验证码错误");
}
}else {
JOptionPane.showMessageDialog(null, "密码错误");
}
}
else {
JOptionPane.showMessageDialog(null, "无此账号记录");
}
}
private static void open() {
// TODO 自动生成的方法存根
}
}
// TODO 自动生成的方法存根
}
}