Java GUI JpasswordField 问题
密码和确认密码是这样的JPasswordFieldpassword,password1;password=newJPasswordField();password1=ne...
密码 和确认密码是这样的
JPasswordField password,password1;
password = new JPasswordField(); password1 = new JPasswordField(); password.setBounds(110, 150, 200, 30); password1.setBounds(110, 220, 200, 30); jp.add(password); jp.add(password1);
我保证每次输入的都是123456 完全一样 但是
String pass = password.getPassword().toString(); System.out.println(pass); String passtrue = password1.getPassword().toString(); System.out.println(passtrue);
结果却是这样
什么情况?????????? 展开
JPasswordField password,password1;
password = new JPasswordField(); password1 = new JPasswordField(); password.setBounds(110, 150, 200, 30); password1.setBounds(110, 220, 200, 30); jp.add(password); jp.add(password1);
我保证每次输入的都是123456 完全一样 但是
String pass = password.getPassword().toString(); System.out.println(pass); String passtrue = password1.getPassword().toString(); System.out.println(passtrue);
结果却是这样
什么情况?????????? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询