| 75 | jf.setVisible(true); |
| 76 | } |
| 77 | public void actionPerformed(ActionEvent ae) { |
| 78 | if(ae.getSource()==jb1) |
| 79 | { String p1 = jpf1.getText(); |
| 80 | String p2 = jpf2.getText(); |
| 81 | |
| 82 | |
| 83 | if(p1.equals(p2)) |
| 84 | { |
| 85 | JOptionPane.showMessageDialog(jf,"Registered Succesfully"); |
| 86 | } |
| 87 | else{ |
| 88 | JOptionPane.showMessageDialog(jf,"Passwords didnt Matched","Alert",JOptionPane.WARNING_MESSAGE); } |
| 89 | } |
| 90 | else if(ae.getSource()==jb2){ |
| 91 | jtf1.setText(null); |
| 92 | jtf2.setText(null); |
| 93 | jtf3.setText(null); |
| 94 | jtf4.setText(null); |
| 95 | jpf1.setText(null); |
| 96 | jpf2.setText(null); |
| 97 | jcb.setSelectedIndex(0); |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 | //Main.java |
| 102 | |