How to Make a Registeration Gui Form in Java Netbeans
Here is the Screenshot of the Code.
Here is the code-
import java.io.File;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
public class Register extends javax.swing.JFrame {
/**
* Creates new form Register
*/
public Register() {
initComponents();
Submit.setEnabled(false);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setExtendedState(JFrame.MAXIMIZED_HORIZ);
setResizable(false);
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
su = new javax.swing.JTextField();
jTextField4 = new javax.swing.JTextField();
rpa = new javax.swing.JTextField();
jTextField6 = new javax.swing.JTextField();
jTextField7 = new javax.swing.JTextField();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jTextField8 = new javax.swing.JTextField();
jTextField9 = new javax.swing.JTextField();
jPanel2 = new javax.swing.JPanel();
Submit = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setMinimumSize(new java.awt.Dimension(892, 518));
getContentPane().setLayout(null);
jPanel1.setBackground(new java.awt.Color(255, 255, 255));
jPanel1.setLayout(null);
jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/system/Home/usericono.png"))); // NOI18N
jPanel1.add(jLabel1);
jLabel1.setBounds(0, 0, 300, 340);
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
jLabel2.setText("Sign Up");
jPanel1.add(jLabel2);
jLabel2.setBounds(80, 340, 140, 60);
getContentPane().add(jPanel1);
jPanel1.setBounds(0, 0, 310, 520);
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel3.setText("First Name:");
getContentPane().add(jLabel3);
jLabel3.setBounds(340, 10, 120, 30);
jLabel4.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel4.setText("Last Name:");
getContentPane().add(jLabel4);
jLabel4.setBounds(340, 60, 110, 22);
jLabel5.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel5.setText("Address:");
getContentPane().add(jLabel5);
jLabel5.setBounds(340, 100, 100, 30);
jLabel6.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel6.setText("Phone Number:");
getContentPane().add(jLabel6);
jLabel6.setBounds(340, 140, 150, 30);
jLabel7.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel7.setText("Set your Username:");
getContentPane().add(jLabel7);
jLabel7.setBounds(330, 180, 180, 40);
jLabel8.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel8.setText("Set up your Password:\n");
getContentPane().add(jLabel8);
jLabel8.setBounds(330, 220, 210, 40);
jLabel9.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel9.setText("Re-enter Your new Password: ");
getContentPane().add(jLabel9);
jLabel9.setBounds(330, 260, 290, 40);
jTextField1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
getContentPane().add(jTextField1);
jTextField1.setBounds(620, 90, 230, 30);
jTextField2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
getContentPane().add(jTextField2);
jTextField2.setBounds(619, 130, 230, 30);
su.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
getContentPane().add(su);
su.setBounds(619, 180, 230, 30);
jTextField4.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
getContentPane().add(jTextField4);
jTextField4.setBounds(620, 220, 230, 30);
rpa.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
getContentPane().add(rpa);
rpa.setBounds(619, 260, 230, 40);
jTextField6.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
getContentPane().add(jTextField6);
jTextField6.setBounds(620, 310, 230, 40);
jTextField7.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jTextField7.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
jTextField7KeyReleased(evt);
}
});
getContentPane().add(jTextField7);
jTextField7.setBounds(619, 390, 230, 40);
jLabel10.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel10.setText("Enter your email-id:");
getContentPane().add(jLabel10);
jLabel10.setBounds(330, 310, 220, 30);
jLabel11.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel11.setText("Enter the Captcha:");
getContentPane().add(jLabel11);
jLabel11.setBounds(330, 390, 190, 30);
jLabel12.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
jLabel12.setText("Captcha: ");
getContentPane().add(jLabel12);
jLabel12.setBounds(330, 344, 120, 40);
jLabel13.setFont(new java.awt.Font("Candara", 3, 18)); // NOI18N
jLabel13.setText(" A1rl1n5");
getContentPane().add(jLabel13);
jLabel13.setBounds(570, 350, 280, 40);
jTextField8.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
getContentPane().add(jTextField8);
jTextField8.setBounds(620, 10, 230, 30);
jTextField9.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
getContentPane().add(jTextField9);
jTextField9.setBounds(620, 50, 230, 30);
jPanel2.setBackground(new java.awt.Color(255, 255, 255));
jPanel2.setLayout(null);
Submit.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
Submit.setText("Submit");
Submit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
SubmitActionPerformed(evt);
}
});
jPanel2.add(Submit);
Submit.setBounds(370, 450, 140, 31);
getContentPane().add(jPanel2);
jPanel2.setBounds(310, 0, 580, 520);
pack();
setLocationRelativeTo(null);
}// </editor-fold>
private void jTextField7KeyReleased(java.awt.event.KeyEvent evt) {
Submit.setEnabled(true);
}
private void SubmitActionPerformed(java.awt.event.ActionEvent evt) {
String e="Now we are directing you to Login_page..Please fill there you username and password";
JOptionPane.showMessageDialog(this,e,"Registeration Compeleted",JOptionPane.INFORMATION_MESSAGE);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
new Register().setVisible(true);
}
// Variables declaration - do not modify
private javax.swing.JButton Submit;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField4;
private javax.swing.JTextField jTextField6;
private javax.swing.JTextField jTextField7;
private javax.swing.JTextField jTextField8;
private javax.swing.JTextField jTextField9;
public static javax.swing.JTextField rpa;
public static javax.swing.JTextField su;
// End of variables declaration
}
Comments
Post a Comment