Write a Java program to design a screen using Awt that will take a user name and password. If the user name and password are not same, raise an Exception with appropriate message. User can have 3 login chances only. Use clear button to clear the TextFields.
import java . awt .*; import java . awt . event .*; import javax . swing .*; class InvalidPasswordException extends Exception { InvalidPasswordException () { System . out . println ( "Username and password is not same" ); } } public class Password extends Frame implements ActionListener { Label uname , upass ; TextField nametext ; TextField passtext , msg ; Button login , Clear ; Panel p ; int attempt = 0 ; char c = '*' ; public void login () { p = new Panel (); uname = new Label ( "Username : " , Label . CENTER ); upass = n...