Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if (cx.equals(zx)){
- JOptionPane.showMessageDialog(null, "Registered Successfully!");
- JOptionPane.showConfirmDialog(null, "Do you want to login now?");
- JWindow window = new JWindow();
- window.getContentPane().add(new JLabel("", new ImageIcon("3.png"),SwingConstants.CENTER));
- window.setBounds(450, 100, 320, 240);
- window.setSize(650,400);
- window.setVisible(true);
- try{
- Thread.sleep(5000);
- }
- catch(InterruptedException ex){}
- window.dispose();
- JFrame frame = new JFrame("Login");
- frame.setVisible(true);
- frame.setBounds(450, 100, 185,265);
- frame.setResizable(false);
- JLabel l, la;
- l = new JLabel("UserID");
- la = new JLabel("Password");
- JPanel p =new JPanel();
- user = new JTextField(15);
- pass = new JPasswordField(15);
- pass.setEchoChar('•');
- pass.addActionListener(this);
- user.addActionListener(this);
- b5 = new JButton("Login");
- b6 = new JButton("Cancel");
- b5.addActionListener(this);
- b5.addActionListener(this);
- p = new JPanel();
- //loigin
- p.add(l);
- p.add(user);
- p.add(la);
- p.add(pass);
- p.add(c);
- p.add(b5);
- p.add(b6);
- b5.setBackground(Color.GREEN);
- b6.setBackground(Color.ORANGE);
- frame.add(p);
- c.addActionListener(this);
- b5.addActionListener(this);
- b6.addActionListener(this);
- }
- else{
- JOptionPane.showMessageDialog(null, "Please Verify your Password");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement