public class LoginCumReg implements ActionListener,KeyListener {
private JFrame form;
private JTextField txtunm;
private JTextField txtnm;
private JTextField txteml;
private JButton cmdcreate;
private JPasswordField txtpass;
private JPasswordField txtpassreg;
private JButton cmdok;
private JLabel lblunm;
private JLabel lblpass;
private JLabel lbleml;
private JLabel lblpassreg;
private JLabel lblnm;
private JPanel panel_1;
public LoginCumReg() {
// construct components
form = new JFrame("Sign Up");
form.getContentPane().setFont(
new Font("Plantagenet Cherokee", Font.BOLD, 18));
txtunm = new JTextField(5);
txtunm.addKeyListener(this);
txtunm.setBounds(637, 55, 100, 25);
txtnm = new JTextField(5);
txtnm.setBounds(637, 228, …
Run Code Online (Sandbox Code Playgroud)