problème d'authentification interface
bonjour j'ai crée une interface d'authentification et le probléme quand je remplir les champs rien ce passe
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| btnValidate.addActionListener(new ActionListener() {
@SuppressWarnings("deprecation")
public void actionPerformed(ActionEvent e) {
//if(!loginAdmin.getText().equals("")&&(!passwordField.getText().equals("")))
//{
User user = new User();
Member membre =AdminstratorDelegate.findMemberAllById(user.getIdUser());
Adminstrator adminstrator=AdminstratorDelegate.findAdminAllById(user.getIdUser());
user=AdminstratorDelegate.findUserByLoginAndPassword(loginAdmin.getText(), passwordField.getText());
if (user != null) {
System.out.println("ok");
if (user instanceof Adminstrator) {
System.out.println("admin");
JOptionPane.showMessageDialog(btnValidate,"authentification sucessfull");
// new GestionUser();
new AdministrationPanel();
dispose();
}
if(user instanceof Member) {
System.out.println("user");
JOptionPane.showMessageDialog(btnValidate,"authentification sucessfull");
new AddUser();
dispose();
}
}
}
}); |