Ejemplo n.º 1
0
  /**
   * 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">//GEN-BEGIN:initComponents
  private void initComponents() {

    diaAccNumConfirm = new javax.swing.JDialog();
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    btnClose = new javax.swing.JButton();
    txtAccNum = new javax.swing.JTextField();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jLabel9 = new javax.swing.JLabel();
    jLabel10 = new javax.swing.JLabel();
    jLabel11 = new javax.swing.JLabel();
    jLabel12 = new javax.swing.JLabel();
    jLabel13 = new javax.swing.JLabel();
    jLabel14 = new javax.swing.JLabel();
    txtAddress = new javax.swing.JTextField();
    txtLastName = new javax.swing.JTextField();
    txtMake = new javax.swing.JTextField();
    txtPayment = new javax.swing.JTextField();
    txtModel = new javax.swing.JTextField();
    txtLicensePlate = new javax.swing.JTextField();
    txtCCNumber = new javax.swing.JTextField();
    txtUsername = new javax.swing.JTextField();
    txtFirstName = new javax.swing.JTextField();
    txtPassword = new javax.swing.JTextField();
    btnGo = new javax.swing.JButton();
    btnExit = new javax.swing.JButton();

    diaAccNumConfirm.setBounds(new java.awt.Rectangle(100, 100, 597, 333));
    diaAccNumConfirm.setResizable(false);

    jLabel5.setFont(new java.awt.Font("Noto Sans", 0, 36)); // NOI18N
    jLabel5.setText("Account created successfully!");

    jLabel6.setFont(new java.awt.Font("Noto Sans", 0, 24)); // NOI18N
    jLabel6.setText("Account Number: ");

    btnClose.setText("Close");
    btnClose.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCloseActionPerformed(evt);
          }
        });

    txtAccNum.setEditable(false);
    // txtAccNum.setBackground(new java.awt.Color(214, 214, 214));
    txtAccNum.setFont(new java.awt.Font("Noto Sans", 0, 24)); // NOI18N
    txtAccNum.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
    txtAccNum.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            txtAccNumActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout diaAccNumConfirmLayout =
        new javax.swing.GroupLayout(diaAccNumConfirm.getContentPane());
    diaAccNumConfirm.getContentPane().setLayout(diaAccNumConfirmLayout);
    diaAccNumConfirmLayout.setHorizontalGroup(
        diaAccNumConfirmLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                diaAccNumConfirmLayout
                    .createSequentialGroup()
                    .addGap(50, 50, 50)
                    .addComponent(jLabel5))
            .addGroup(
                diaAccNumConfirmLayout
                    .createSequentialGroup()
                    .addGap(50, 50, 50)
                    .addComponent(jLabel6)
                    .addGap(15, 15, 15)
                    .addComponent(
                        txtAccNum,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        130,
                        javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(
                diaAccNumConfirmLayout
                    .createSequentialGroup()
                    .addGap(260, 260, 260)
                    .addComponent(btnClose)));
    diaAccNumConfirmLayout.setVerticalGroup(
        diaAccNumConfirmLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                diaAccNumConfirmLayout
                    .createSequentialGroup()
                    .addGap(12, 12, 12)
                    .addComponent(jLabel5)
                    .addGap(34, 34, 34)
                    .addGroup(
                        diaAccNumConfirmLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel6)
                            .addGroup(
                                diaAccNumConfirmLayout
                                    .createSequentialGroup()
                                    .addGap(4, 4, 4)
                                    .addComponent(
                                        txtAccNum,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(65, 65, 65)
                    .addComponent(btnClose)));

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jLabel1.setText("Username");

    jLabel2.setText("Password:"******"First Name:");

    jLabel4.setText("Last Name:");

    jLabel9.setText("Address:");

    jLabel10.setText("Make:");

    jLabel11.setText("Model:");

    jLabel12.setText("License Plate:");

    jLabel13.setText("Credit Card Number:");

    jLabel14.setText("Initial Payment:");

    btnGo.setText("Go!");
    btnGo.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnGoActionPerformed(evt);
          }
        });

    btnExit.setText("Exit");
    btnExit.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnExitActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel14, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                txtAddress,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                txtLastName,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                txtMake,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                txtPayment,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                73,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                txtModel,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                txtLicensePlate,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                txtCCNumber,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                txtFirstName,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                73,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                txtPassword,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                txtUsername,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                373,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(81, 81, 81))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        btnExit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        118,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE)
                                    .addComponent(
                                        btnGo,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        115,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(110, 110, 110)))));

    layout.linkSize(
        javax.swing.SwingConstants.HORIZONTAL,
        new java.awt.Component[] {
          txtAddress,
          txtCCNumber,
          txtFirstName,
          txtLastName,
          txtLicensePlate,
          txtMake,
          txtModel,
          txtPassword,
          txtPayment,
          txtUsername
        });

    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(14, 14, 14)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                27,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                txtUsername,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(
                                txtPassword,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(
                                txtFirstName,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(
                                txtLastName,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9)
                            .addComponent(
                                txtAddress,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10)
                            .addComponent(
                                txtMake,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel11)
                            .addComponent(
                                txtModel,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel12)
                            .addComponent(
                                txtLicensePlate,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel14)
                            .addComponent(
                                txtPayment,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(1, 1, 1)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13)
                            .addComponent(
                                txtCCNumber,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btnGo)
                            .addComponent(btnExit))
                    .addGap(29, 29, 29)));

    layout.linkSize(
        javax.swing.SwingConstants.VERTICAL,
        new java.awt.Component[] {
          jLabel1,
          jLabel10,
          jLabel11,
          jLabel12,
          jLabel13,
          jLabel14,
          jLabel2,
          jLabel3,
          jLabel4,
          jLabel9,
          txtAddress,
          txtCCNumber,
          txtFirstName,
          txtLastName,
          txtLicensePlate,
          txtMake,
          txtModel,
          txtPayment,
          txtUsername
        });

    pack();
  } // </editor-fold>//GEN-END:initComponents
Ejemplo n.º 2
0
  /**
   * 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">//GEN-BEGIN:initComponents
  private void initComponents() {

    imgPath = new javax.swing.JLabel();
    cerrar = new javax.swing.JButton();
    txtPath = new javax.swing.JTextField();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("SNTIAISCRM Sistema de Recursos Humanos");

    imgPath.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    imgPath.setBorder(
        javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));

    cerrar.setText("Cerrar");
    cerrar.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            cerrarActionPerformed(evt);
          }
        });

    txtPath.setEditable(false);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                imgPath, javax.swing.GroupLayout.DEFAULT_SIZE, 580, Short.MAX_VALUE)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(txtPath)
                                    .addGap(18, 18, 18)
                                    .addComponent(cerrar)))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        imgPath,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        695,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cerrar)
                            .addComponent(
                                txtPath,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(16, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents
  /**
   * 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">//GEN-BEGIN:initComponents
  private void initComponents() {

    jButton1 = new javax.swing.JButton();
    imagePanel1 = new ImagePanel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Google Maps Example");

    jButton1.setText("Retrieve Map");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    imagePanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    javax.swing.GroupLayout imagePanel1Layout = new javax.swing.GroupLayout(imagePanel1);
    imagePanel1.setLayout(imagePanel1Layout);
    imagePanel1Layout.setHorizontalGroup(
        imagePanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 397, Short.MAX_VALUE));
    imagePanel1Layout.setVerticalGroup(
        imagePanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 352, Short.MAX_VALUE));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(28, 28, 28)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                imagePanel1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(47, 47, 47)
                                    .addComponent(
                                        jButton1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        316,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(30, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(25, 25, 25)
                    .addComponent(
                        imagePanel1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jButton1)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents