Guest User

Untitled

a guest
Jul 31st, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 15.48 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package xhire;
  7. import java.awt.Color;
  8. import java.awt.Component;
  9. import javax.swing.BorderFactory;
  10. /**
  11.  *
  12.  * @author Jory-Desktop
  13.  */
  14. public class CustomerPane extends javax.swing.JPanel {
  15.  
  16.     /**
  17.      * Creates new form CustomerPane
  18.      */
  19.     public CustomerPane() {
  20.         initComponents();
  21.     }
  22.  
  23.     /**
  24.      * This method is called from within the constructor to initialize the form.
  25.      * WARNING: Do NOT modify this code. The content of this method is always
  26.      * regenerated by the Form Editor.
  27.      */
  28.     @SuppressWarnings("unchecked")
  29.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  30.     private void initComponents() {
  31.  
  32.         Filler = new javax.swing.JPanel();
  33.         jLabel1 = new javax.swing.JLabel();
  34.         UI_FirstName = new javax.swing.JTextField();
  35.         jLabel2 = new javax.swing.JLabel();
  36.         jLabel3 = new javax.swing.JLabel();
  37.         UI_LastName = new javax.swing.JTextField();
  38.         jLabel4 = new javax.swing.JLabel();
  39.         UI_Email = new javax.swing.JTextField();
  40.         jLabel5 = new javax.swing.JLabel();
  41.         UI_PhoneNumber = new javax.swing.JTextField();
  42.         jLabel6 = new javax.swing.JLabel();
  43.         UI_Work = new javax.swing.JTextField();
  44.         jLabel7 = new javax.swing.JLabel();
  45.         UI_Role = new javax.swing.JTextField();
  46.         UI_Password = new javax.swing.JTextField();
  47.         jLabel8 = new javax.swing.JLabel();
  48.         jLabel9 = new javax.swing.JLabel();
  49.         UI_Website = new javax.swing.JTextField();
  50.         jLabel10 = new javax.swing.JLabel();
  51.         jLabel11 = new javax.swing.JLabel();
  52.         jLabel12 = new javax.swing.JLabel();
  53.         btn_Submit = new javax.swing.JButton();
  54.  
  55.         Filler.setBackground(new java.awt.Color(25, 25, 25));
  56.         Filler.setMaximumSize(new java.awt.Dimension(1270, 878));
  57.         Filler.setPreferredSize(new java.awt.Dimension(1270, 878));
  58.  
  59.         jLabel1.setFont(new java.awt.Font("DFSC Sans Core104", 1, 36)); // NOI18N
  60.         jLabel1.setForeground(new java.awt.Color(255, 255, 255));
  61.         jLabel1.setText("ADD CUSTOMER");
  62.  
  63.         UI_FirstName.setBackground(new java.awt.Color(25, 25, 25));
  64.         UI_FirstName.setForeground(new java.awt.Color(255, 255, 255));
  65.         UI_FirstName.setBorder(new javax.swing.border.MatteBorder(0,0,1,0,Color.LIGHT_GRAY));
  66.  
  67.         jLabel2.setFont(new java.awt.Font("Microsoft New Tai Lue", 0, 14)); // NOI18N
  68.         jLabel2.setForeground(new java.awt.Color(255, 255, 255));
  69.         jLabel2.setText("First Name");
  70.  
  71.         jLabel3.setFont(new java.awt.Font("Microsoft New Tai Lue", 0, 14)); // NOI18N
  72.         jLabel3.setForeground(new java.awt.Color(255, 255, 255));
  73.         jLabel3.setText("Last Name");
  74.  
  75.         UI_LastName.setBackground(new java.awt.Color(25, 25, 25));
  76.         UI_LastName.setForeground(new java.awt.Color(255, 255, 255));
  77.         UI_LastName.setBorder(new javax.swing.border.MatteBorder(0,0,1,0,Color.LIGHT_GRAY));
  78.  
  79.         jLabel4.setFont(new java.awt.Font("Microsoft New Tai Lue", 0, 14)); // NOI18N
  80.         jLabel4.setForeground(new java.awt.Color(255, 255, 255));
  81.         jLabel4.setText("Email Address");
  82.  
  83.         UI_Email.setBackground(new java.awt.Color(25, 25, 25));
  84.         UI_Email.setForeground(new java.awt.Color(255, 255, 255));
  85.         UI_Email.setBorder(new javax.swing.border.MatteBorder(0,0,1,0,Color.LIGHT_GRAY));
  86.  
  87.         jLabel5.setFont(new java.awt.Font("Microsoft New Tai Lue", 0, 14)); // NOI18N
  88.         jLabel5.setForeground(new java.awt.Color(255, 255, 255));
  89.         jLabel5.setText("Phone Number");
  90.  
  91.         UI_PhoneNumber.setBackground(new java.awt.Color(25, 25, 25));
  92.         UI_PhoneNumber.setForeground(new java.awt.Color(255, 255, 255));
  93.         UI_PhoneNumber.setBorder(new javax.swing.border.MatteBorder(0,0,1,0,Color.LIGHT_GRAY));
  94.  
  95.         jLabel6.setFont(new java.awt.Font("Microsoft New Tai Lue", 0, 14)); // NOI18N
  96.         jLabel6.setForeground(new java.awt.Color(255, 255, 255));
  97.         jLabel6.setText("Comapny Of Work");
  98.  
  99.         UI_Work.setBackground(new java.awt.Color(25, 25, 25));
  100.         UI_Work.setForeground(new java.awt.Color(255, 255, 255));
  101.         UI_Work.setBorder(new javax.swing.border.MatteBorder(0,0,1,0,Color.LIGHT_GRAY));
  102.  
  103.         jLabel7.setFont(new java.awt.Font("Microsoft New Tai Lue", 0, 14)); // NOI18N
  104.         jLabel7.setForeground(new java.awt.Color(255, 255, 255));
  105.         jLabel7.setText("Role");
  106.  
  107.         UI_Role.setBackground(new java.awt.Color(25, 25, 25));
  108.         UI_Role.setForeground(new java.awt.Color(255, 255, 255));
  109.         UI_Role.setBorder(new javax.swing.border.MatteBorder(0,0,1,0,Color.LIGHT_GRAY));
  110.  
  111.         UI_Password.setBackground(new java.awt.Color(25, 25, 25));
  112.         UI_Password.setForeground(new java.awt.Color(255, 255, 255));
  113.         UI_Password.setText("password");
  114.         UI_Password.setBorder(new javax.swing.border.MatteBorder(0,0,1,0,Color.LIGHT_GRAY));
  115.  
  116.         jLabel8.setFont(new java.awt.Font("Microsoft New Tai Lue", 0, 14)); // NOI18N
  117.         jLabel8.setForeground(new java.awt.Color(255, 255, 255));
  118.         jLabel8.setText("User Password");
  119.  
  120.         jLabel9.setFont(new java.awt.Font("Microsoft New Tai Lue", 0, 14)); // NOI18N
  121.         jLabel9.setForeground(new java.awt.Color(255, 255, 255));
  122.         jLabel9.setText("Website");
  123.  
  124.         UI_Website.setBackground(new java.awt.Color(25, 25, 25));
  125.         UI_Website.setForeground(new java.awt.Color(255, 255, 255));
  126.         UI_Website.setBorder(new javax.swing.border.MatteBorder(0,0,1,0,Color.LIGHT_GRAY));
  127.  
  128.         jLabel10.setFont(new java.awt.Font("Microsoft New Tai Lue", 1, 18)); // NOI18N
  129.         jLabel10.setForeground(new java.awt.Color(255, 255, 255));
  130.         jLabel10.setText("Contact Infomation");
  131.  
  132.         jLabel11.setFont(new java.awt.Font("Microsoft New Tai Lue", 1, 18)); // NOI18N
  133.         jLabel11.setForeground(new java.awt.Color(255, 255, 255));
  134.         jLabel11.setText("Account Infomation");
  135.  
  136.         jLabel12.setFont(new java.awt.Font("Microsoft New Tai Lue", 1, 18)); // NOI18N
  137.         jLabel12.setForeground(new java.awt.Color(255, 255, 255));
  138.         jLabel12.setText("Work Infomation");
  139.  
  140.         btn_Submit.setText("Submit");
  141.         btn_Submit.addMouseListener(new java.awt.event.MouseAdapter() {
  142.             public void mouseClicked(java.awt.event.MouseEvent evt) {
  143.                 btn_SubmitMouseClicked(evt);
  144.             }
  145.         });
  146.         btn_Submit.addActionListener(new java.awt.event.ActionListener() {
  147.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  148.                 btn_SubmitActionPerformed(evt);
  149.             }
  150.         });
  151.  
  152.         javax.swing.GroupLayout FillerLayout = new javax.swing.GroupLayout(Filler);
  153.         Filler.setLayout(FillerLayout);
  154.         FillerLayout.setHorizontalGroup(
  155.             FillerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  156.             .addGroup(FillerLayout.createSequentialGroup()
  157.                 .addGap(10, 10, 10)
  158.                 .addGroup(FillerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  159.                     .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 314, javax.swing.GroupLayout.PREFERRED_SIZE)
  160.                     .addComponent(jLabel11)
  161.                     .addGroup(FillerLayout.createSequentialGroup()
  162.                         .addComponent(UI_FirstName, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)
  163.                         .addGap(18, 18, 18)
  164.                         .addComponent(UI_LastName, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)
  165.                         .addGap(18, 18, 18)
  166.                         .addComponent(UI_Password, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE))
  167.                     .addGroup(FillerLayout.createSequentialGroup()
  168.                         .addComponent(jLabel2)
  169.                         .addGap(232, 232, 232)
  170.                         .addComponent(jLabel3)
  171.                         .addGap(233, 233, 233)
  172.                         .addComponent(jLabel8))
  173.                     .addComponent(jLabel10)
  174.                     .addGroup(FillerLayout.createSequentialGroup()
  175.                         .addComponent(UI_Email, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)
  176.                         .addGap(18, 18, 18)
  177.                         .addComponent(UI_PhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)
  178.                         .addGap(18, 18, 18)
  179.                         .addComponent(UI_Website, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE))
  180.                     .addGroup(FillerLayout.createSequentialGroup()
  181.                         .addComponent(jLabel4)
  182.                         .addGap(213, 213, 213)
  183.                         .addComponent(jLabel5)
  184.                         .addGap(205, 205, 205)
  185.                         .addComponent(jLabel9))
  186.                     .addComponent(jLabel12)
  187.                     .addGroup(FillerLayout.createSequentialGroup()
  188.                         .addComponent(UI_Work, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)
  189.                         .addGap(18, 18, 18)
  190.                         .addComponent(UI_Role, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE))
  191.                     .addGroup(FillerLayout.createSequentialGroup()
  192.                         .addComponent(jLabel6)
  193.                         .addGap(183, 183, 183)
  194.                         .addComponent(jLabel7))
  195.                     .addComponent(btn_Submit, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)))
  196.         );
  197.         FillerLayout.setVerticalGroup(
  198.             FillerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  199.             .addGroup(FillerLayout.createSequentialGroup()
  200.                 .addGap(11, 11, 11)
  201.                 .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
  202.                 .addGap(11, 11, 11)
  203.                 .addComponent(jLabel11)
  204.                 .addGap(4, 4, 4)
  205.                 .addGroup(FillerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  206.                     .addComponent(UI_FirstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  207.                     .addComponent(UI_LastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  208.                     .addComponent(UI_Password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  209.                 .addGroup(FillerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  210.                     .addComponent(jLabel2)
  211.                     .addComponent(jLabel3)
  212.                     .addComponent(jLabel8))
  213.                 .addGap(11, 11, 11)
  214.                 .addComponent(jLabel10)
  215.                 .addGap(4, 4, 4)
  216.                 .addGroup(FillerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  217.                     .addComponent(UI_Email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  218.                     .addComponent(UI_PhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  219.                     .addComponent(UI_Website, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  220.                 .addGroup(FillerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  221.                     .addComponent(jLabel4)
  222.                     .addComponent(jLabel5)
  223.                     .addComponent(jLabel9))
  224.                 .addGap(14, 14, 14)
  225.                 .addComponent(jLabel12)
  226.                 .addGap(4, 4, 4)
  227.                 .addGroup(FillerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  228.                     .addComponent(UI_Work, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  229.                     .addComponent(UI_Role, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  230.                 .addGroup(FillerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  231.                     .addComponent(jLabel6)
  232.                     .addComponent(jLabel7))
  233.                 .addGap(18, 18, 18)
  234.                 .addComponent(btn_Submit))
  235.         );
  236.  
  237.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
  238.         this.setLayout(layout);
  239.         layout.setHorizontalGroup(
  240.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  241.             .addComponent(Filler, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 1200, Short.MAX_VALUE)
  242.         );
  243.         layout.setVerticalGroup(
  244.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  245.             .addComponent(Filler, javax.swing.GroupLayout.DEFAULT_SIZE, 900, Short.MAX_VALUE)
  246.         );
  247.     }// </editor-fold>                        
  248.  
  249.     private void btn_SubmitActionPerformed(java.awt.event.ActionEvent evt) {                                          
  250.         // TODO add your handling code here:
  251.     }                                          
  252.  
  253.     private void btn_SubmitMouseClicked(java.awt.event.MouseEvent evt) {                                        
  254.     String UserName = UI_FirstName.getText();
  255.     String UserLastName = UI_LastName.getText();
  256.     String PasswordPass = UI_Password.getText();
  257.     String Email = UI_Email.getText();
  258.     String PhoneNumber = UI_PhoneNumber.getText();
  259.     String Website = UI_Website.getText();
  260.     String Work = UI_Work.getText();
  261.     String Role = UI_Role.getText();
  262.     DataAccess DA = new DataAccess();
  263.     DA.passdata_Customer(UserName,UserLastName,PasswordPass,Email,PhoneNumber,Website,Work,Role);
  264.    
  265.     }                                      
  266.  
  267.  
  268.     // Variables declaration - do not modify                    
  269.     private javax.swing.JPanel Filler;
  270.     private javax.swing.JTextField UI_Email;
  271.     private javax.swing.JTextField UI_FirstName;
  272.     private javax.swing.JTextField UI_LastName;
  273.     private javax.swing.JTextField UI_Password;
  274.     private javax.swing.JTextField UI_PhoneNumber;
  275.     private javax.swing.JTextField UI_Role;
  276.     private javax.swing.JTextField UI_Website;
  277.     private javax.swing.JTextField UI_Work;
  278.     private javax.swing.JButton btn_Submit;
  279.     private javax.swing.JLabel jLabel1;
  280.     private javax.swing.JLabel jLabel10;
  281.     private javax.swing.JLabel jLabel11;
  282.     private javax.swing.JLabel jLabel12;
  283.     private javax.swing.JLabel jLabel2;
  284.     private javax.swing.JLabel jLabel3;
  285.     private javax.swing.JLabel jLabel4;
  286.     private javax.swing.JLabel jLabel5;
  287.     private javax.swing.JLabel jLabel6;
  288.     private javax.swing.JLabel jLabel7;
  289.     private javax.swing.JLabel jLabel8;
  290.     private javax.swing.JLabel jLabel9;
  291.     // End of variables declaration                  
  292. }
Add Comment
Please, Sign In to add comment