Please someone hlep me, based on the java code given how can i make the change to program run like the example given. InvalidPasswordException.java public class InvalidPasswordException extends Exception{ public InvalidPasswordException (String errMsg){ super(errMsg);
Q1 Please someone hlep me, based on the java code given how can i make the change to program run like the example given.
InvalidPasswordException.java public class InvalidPasswordException extends Exception{ |
Password.java public class Password { public Password (String passwordstr) throws InvalidPasswordException { int countLetters=0; else if (Character.isLetter(ch)) }
|
import javax.swing.*; class TextFieldExample { public static void main(String args[]) { JFrame f= new JFrame("TextField Example"); JTextField t1,t2; t1=new JTextField("Enter your password"); t1.setBounds(50,100, 200,30); f.add(t1); JButton b=new JButton("Click Here"); b.setBounds(50,100,95,30); f.add(b); f.setSize(400,400); f.setLayout(null); f.setVisible(true); } } |
Step by step
Solved in 3 steps with 6 images