S 4
S 4
import java.util.Scanner;
display(arr2, r, c);
}
//*****************************************************************************
import java.awt.*;
import java.awt.event.*;
p.add(uname);
p.add(nametext);
p.add(upass);
p.add(passtext);
p.add(login);
p.add(Clear);
p.add(msg);
add(p);
setTitle("Login ");
setSize(290, 200);
setResizable(false);
setVisible(true);
}
if (user.compareTo(upass) == 0) {
msg.setText("Valid");
System.out.println("Username is valid");
} else {
throw new InvalidPasswordException();
}
} catch (Exception e) {
msg.setText("Error");
}
attempt++;
}
} else {
System.out.println("you are using 3 attempt");
System.exit(0);
}
}