Java Forgot Password GUI
Hi, I need a simple graphic user interface for a “forgotpassword” feature coded up in Java. It needs to havefunctionality.
Thank you
Solution
SourceCode:
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class ForgotPasswordGUI extends JFrame
{
JLabel lbl1, lbl2;
JPasswordField fld1, fld2;
JButton confirm, newP;
JPanel pnl1, pnl2;
public ForgotPasswordGUI()
{
super(“Forgot Password GUI”);
setLayout(null);
pnl1 = new JPanel();
pnl1.setLayout(null);
pnl1.setSize(400, 400);
pnl1.setVisible(true);
pnl2 = new JPanel();
pnl2.setLayout(null);
pnl2.setSize(400, 400);
pnl2.setVisible(false);
newP = new JButton(“ForgotPassword”);
newP.setBounds(100,100,150,30);
pnl1.add(newP);
// when forgot password button isclicked, panel1 is