错误太多,随便找一个
Landing.java中的一段,我进行了修改
jButtondetermined.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
//System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
if(jTextFieldaccount.getText().equals("9559980020207500000")){
String password=new String();
for(int i=0;i<jPasswordFieldpassword.getPassword().length;i++){
password=password.concat(Character.toString(jPasswordFieldpassword.getPassword()[i]));
}
if(password.equals("123456")){
if(jComboBoxcompetence.getSelectedItem()=="用户"){
new Users().setVisible(true);
//###################################被修改的部分################################
//new Landing().dispose(); 这样写是错的!
setVisible(false);
} else{new LandingWrong().setVisible(true);setVisible(false);} //添加setVisible(false);
} else{new LandingWrong().setVisible(true);setVisible(false);} //同上
} else{new LandingWrong().setVisible(true);setVisible(false);} //同上
//#############################################################################
}