
package ALL_Frames;

import java.awt.Color;
import java.io.UnsupportedEncodingException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.AbstractAction;
import javax.swing.*;
import javax.swing.JFrame;
import javax.swing.border.Border;
import javax.swing.border.LineBorder;

/**
 *
 * @author ranvi
 */
public class A_Login_Page extends javax.swing.JFrame {

    /**
     * Creates new form A_Login_Page
     */
    int x,y;
    public A_Login_Page() {
        initComponents();
        int x,y;
        LoginTx.setBackground(new Color(0,0,0,180));
        SysTx.setBackground(new Color(0,0,0,180));
        //jPanel6.setBackground(new Color(255,0,51,20));
 p2.setBackground(new Color(0,0,0,0));
  p3.setBackground(new Color(0,0,0,0));
  p1.setBackground(new Color(0,0,0,0));
   //jPanel1.setBackground(new Color(255,0,51,150));
    this.p1.setVisible(false);
this.p2.setVisible(false);
    this.up3.setVisible(false);
    this.up4.setVisible(false);
    //this.ap.setVisible(false);
    //this.a5.setVisible(false);
    this.a1.setVisible(false);
    //this.a2.setVisible(false);
    this.a3.setVisible(false);
    this.aid.setVisible(false);
    this.aps.setVisible(false);
    this.a4.setVisible(false);    
    this.a6.setVisible(false); 
    this.s1.setVisible(false);
    this.s2.setVisible(false);
    this.s3.setVisible(false);
    this.s4.setVisible(false);
    this.s5.setVisible(false);
    this.s6.setVisible(false);    
    this.s7.setVisible(false);
    this.up4.setVisible(false);
    
    
    this.jLabel8.setVisible(false);
    this.jLabel19.setVisible(false);
    this.jLabel20.setVisible(false);
    this.jLabel18.setVisible(false);
    jLabel21.setBackground(new Color(255,255,255,150));
    }

    /**
     * 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() {

        Mainf = new javax.swing.JPanel();
        p1 = new javax.swing.JPanel();
        s5 = new javax.swing.JLabel();
        s4 = new javax.swing.JLabel();
        s1 = new javax.swing.JLabel();
        s7 = new javax.swing.JLabel();
        s6 = new javax.swing.JLabel();
        s3 = new javax.swing.JPasswordField();
        s2 = new javax.swing.JTextField();
        up4 = new javax.swing.JPanel();
        jLabel20 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        p2 = new javax.swing.JPanel();
        jLabel23 = new javax.swing.JLabel();
        a1 = new javax.swing.JLabel();
        up3 = new javax.swing.JPanel();
        a3 = new javax.swing.JLabel();
        aps = new javax.swing.JPasswordField();
        a4 = new javax.swing.JLabel();
        a6 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        a5 = new javax.swing.JLabel();
        aid = new javax.swing.JTextField();
        admbtn = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        salbtn = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        LoginTx = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        p3 = new javax.swing.JPanel();
        SysTx = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel21 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setModalExclusionType(java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
        setName("logmain"); // NOI18N
        setUndecorated(true);
        setType(java.awt.Window.Type.POPUP);

        Mainf.setBackground(new java.awt.Color(255, 255, 255));
        Mainf.setPreferredSize(new java.awt.Dimension(1460, 800));
        Mainf.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        p1.setBackground(new java.awt.Color(255, 255, 255));
        p1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        s5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/AIcon/icons8_user_groups_64px.png"))); // NOI18N
        s5.setText("jLabel4");
        s5.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        s5.setOpaque(true);
        p1.add(s5, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 100, 60, 59));

        s4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/AIcon/icons8_password_64px_1.png"))); // NOI18N
        s4.setText("jLabel5");
        s4.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        s4.setOpaque(true);
        p1.add(s4, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 200, 60, 60));

        s1.setFont(new java.awt.Font("Segoe UI Symbol", 1, 36)); // NOI18N
        s1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        s1.setText("Sales Person");
        s1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        p1.add(s1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 20, 270, 50));

        s7.setBackground(new java.awt.Color(153, 153, 153));
        s7.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        s7.setForeground(new java.awt.Color(255, 255, 255));
        s7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        s7.setText("Forgot ( Sales Person ) PassWord..?");
        s7.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        s7.setOpaque(true);
        s7.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                s7MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                s7MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                s7MouseExited(evt);
            }
        });
        p1.add(s7, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 390, 430, 30));

        s6.setBackground(new java.awt.Color(0, 0, 204));
        s6.setFont(new java.awt.Font("Segoe UI Symbol", 1, 36)); // NOI18N
        s6.setForeground(new java.awt.Color(255, 255, 255));
        s6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        s6.setText("Login");
        s6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        s6.setOpaque(true);
        s6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                s6MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                s6MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                s6MouseExited(evt);
            }
        });
        p1.add(s6, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 310, 430, 60));

        s3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        s3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        s3.setText("password");
        s3.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        s3.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        s3.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                s3FocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                s3FocusLost(evt);
            }
        });
        p1.add(s3, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 200, 360, 50));

        s2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        s2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        s2.setText("Login_Id");
        s2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        s2.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        s2.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                s2FocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                s2FocusLost(evt);
            }
        });
        s2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                s2MouseClicked(evt);
            }
        });
        s2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                s2ActionPerformed(evt);
            }
        });
        p1.add(s2, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 100, 360, 57));

        up4.setBackground(new java.awt.Color(0, 51, 204));

        javax.swing.GroupLayout up4Layout = new javax.swing.GroupLayout(up4);
        up4.setLayout(up4Layout);
        up4Layout.setHorizontalGroup(
            up4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        up4Layout.setVerticalGroup(
            up4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        p1.add(up4, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, 430, -1));

        jLabel20.setFont(new java.awt.Font("Segoe UI Historic", 1, 14)); // NOI18N
        jLabel20.setForeground(new java.awt.Color(255, 0, 0));
        jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel20.setText("Wrong PassWord");
        p1.add(jLabel20, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 260, 360, 20));

        jLabel19.setFont(new java.awt.Font("Segoe UI Historic", 1, 14)); // NOI18N
        jLabel19.setForeground(new java.awt.Color(255, 0, 0));
        jLabel19.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel19.setText("Wrong Id");
        p1.add(jLabel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 160, 360, -1));

        jLabel22.setBackground(new java.awt.Color(255, 255, 255));
        jLabel22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icones/icons8_close_window_50px.png"))); // NOI18N
        jLabel22.setOpaque(true);
        jLabel22.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel22MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel22MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLabel22MouseExited(evt);
            }
        });
        p1.add(jLabel22, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 0, -1, -1));

        jPanel4.setBackground(new java.awt.Color(51, 0, 255));

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 450, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 10, Short.MAX_VALUE)
        );

        p1.add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, 450, 10));

        Mainf.add(p1, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 250, 470, 480));

        p2.setBackground(new java.awt.Color(255, 255, 255));
        p2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel23.setBackground(new java.awt.Color(255, 255, 255));
        jLabel23.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icones/icons8_close_window_50px.png"))); // NOI18N
        jLabel23.setOpaque(true);
        jLabel23.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel23MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel23MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLabel23MouseExited(evt);
            }
        });
        p2.add(jLabel23, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 0, 50, 50));

        a1.setFont(new java.awt.Font("Segoe UI Symbol", 1, 36)); // NOI18N
        a1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        a1.setText("Admin");
        p2.add(a1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 20, 250, -1));

        up3.setBackground(new java.awt.Color(0, 51, 204));

        javax.swing.GroupLayout up3Layout = new javax.swing.GroupLayout(up3);
        up3.setLayout(up3Layout);
        up3Layout.setHorizontalGroup(
            up3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 440, Short.MAX_VALUE)
        );
        up3Layout.setVerticalGroup(
            up3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 10, Short.MAX_VALUE)
        );

        p2.add(up3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, 440, 10));

        a3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/AIcon/icons8_password_64px_1.png"))); // NOI18N
        a3.setText("jLabel5");
        a3.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        a3.setOpaque(true);
        p2.add(a3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 190, 60, 60));

        aps.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        aps.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        aps.setText("password");
        aps.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        aps.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        aps.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                apsFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                apsFocusLost(evt);
            }
        });
        aps.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                apsMouseClicked(evt);
            }
        });
        p2.add(aps, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 200, 360, 51));

        a4.setBackground(new java.awt.Color(0, 0, 204));
        a4.setFont(new java.awt.Font("Segoe UI Symbol", 1, 36)); // NOI18N
        a4.setForeground(new java.awt.Color(255, 255, 255));
        a4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        a4.setText("Login");
        a4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        a4.setOpaque(true);
        a4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                a4MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                a4MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                a4MouseExited(evt);
            }
        });
        p2.add(a4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 310, 430, 61));

        a6.setBackground(new java.awt.Color(153, 153, 153));
        a6.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        a6.setForeground(new java.awt.Color(255, 255, 255));
        a6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        a6.setText("Forgot ( Admin ) PassWord..?");
        a6.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        a6.setOpaque(true);
        a6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                a6MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                a6MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                a6MouseExited(evt);
            }
        });
        p2.add(a6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 400, 430, 30));

        jLabel8.setFont(new java.awt.Font("Segoe UI Historic", 1, 14)); // NOI18N
        jLabel8.setForeground(new java.awt.Color(255, 0, 0));
        jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel8.setText("Wrong PassWord");
        p2.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 250, 360, -1));

        jLabel18.setFont(new java.awt.Font("Segoe UI Historic", 1, 14)); // NOI18N
        jLabel18.setForeground(new java.awt.Color(255, 0, 0));
        jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel18.setText("Wrong Id");
        p2.add(jLabel18, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 170, 350, -1));

        a5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/AIcon/icons8_user_80px.png"))); // NOI18N
        a5.setText("jLabel4");
        a5.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        a5.setOpaque(true);
        p2.add(a5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, 60, 60));

        aid.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        aid.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        aid.setText("Login_ID");
        aid.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2, true));
        aid.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        aid.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                aidFocusGained(evt);
            }
            public void focusLost(java.awt.event.FocusEvent evt) {
                aidFocusLost(evt);
            }
        });
        aid.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                aidMouseClicked(evt);
            }
        });
        p2.add(aid, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 110, 360, 57));

        Mainf.add(p2, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 250, 460, 470));

        admbtn.setBackground(new java.awt.Color(0, 0, 0));
        admbtn.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 51, 255), 3, true));
        admbtn.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel1.setBackground(new java.awt.Color(0, 0, 0));
        jLabel1.setFont(new java.awt.Font("Segoe UI Symbol", 1, 36)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Admin");
        jLabel1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel1.setOpaque(true);
        jLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel1MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel1MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLabel1MouseExited(evt);
            }
        });
        admbtn.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 330, 60));

        Mainf.add(admbtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 130, 330, 60));

        salbtn.setBackground(new java.awt.Color(0, 0, 0));
        salbtn.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(51, 51, 255), 3, true));
        salbtn.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel2.setBackground(new java.awt.Color(0, 0, 0));
        jLabel2.setFont(new java.awt.Font("Segoe UI Symbol", 1, 36)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setText("Sales Person");
        jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel2.setOpaque(true);
        jLabel2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel2MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel2MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLabel2MouseExited(evt);
            }
        });
        salbtn.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 330, 60));

        Mainf.add(salbtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 130, 330, 60));

        jPanel2.setBackground(new java.awt.Color(51, 0, 51));
        jPanel2.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                jPanel2MouseDragged(evt);
            }
        });
        jPanel2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jPanel2MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jPanel2MouseEntered(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                jPanel2MousePressed(evt);
            }
        });

        jLabel3.setBackground(new java.awt.Color(51, 0, 51));
        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/AIcon/icons8_shutdown_48px.png"))); // NOI18N
        jLabel3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel3.setOpaque(true);
        jLabel3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel3MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel3MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLabel3MouseExited(evt);
            }
        });

        jLabel4.setBackground(new java.awt.Color(51, 0, 51));
        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Minimize.png"))); // NOI18N
        jLabel4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel4.setOpaque(true);
        jLabel4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel4MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel4MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLabel4MouseExited(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(1345, Short.MAX_VALUE)
                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        Mainf.add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1460, 50));

        LoginTx.setBackground(new java.awt.Color(0, 0, 0));

        jLabel5.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel5.setText("L");

        jLabel6.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel6.setText("O");

        jLabel7.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel7.setText("I");

        jLabel9.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel9.setForeground(new java.awt.Color(255, 255, 255));
        jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel9.setText("G");

        jLabel10.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel10.setForeground(new java.awt.Color(255, 255, 255));
        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel10.setText("N");

        javax.swing.GroupLayout LoginTxLayout = new javax.swing.GroupLayout(LoginTx);
        LoginTx.setLayout(LoginTxLayout);
        LoginTxLayout.setHorizontalGroup(
            LoginTxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)
            .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)
            .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)
            .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)
        );
        LoginTxLayout.setVerticalGroup(
            LoginTxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LoginTxLayout.createSequentialGroup()
                .addGap(67, 67, 67)
                .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(70, Short.MAX_VALUE))
        );

        Mainf.add(LoginTx, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 130, 90, 610));

        jPanel3.setOpaque(false);
        jPanel3.setPreferredSize(new java.awt.Dimension(1460, 800));
        jPanel3.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        p3.setBackground(new java.awt.Color(255, 255, 255));

        javax.swing.GroupLayout p3Layout = new javax.swing.GroupLayout(p3);
        p3.setLayout(p3Layout);
        p3Layout.setHorizontalGroup(
            p3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 470, Short.MAX_VALUE)
        );
        p3Layout.setVerticalGroup(
            p3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 480, Short.MAX_VALUE)
        );

        jPanel3.add(p3, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 250, 470, 480));

        Mainf.add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1460, 820));

        SysTx.setBackground(new java.awt.Color(0, 0, 0));

        jLabel11.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel11.setForeground(new java.awt.Color(255, 255, 255));
        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel11.setText("S");

        jLabel12.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel12.setForeground(new java.awt.Color(255, 255, 255));
        jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel12.setText("Y");

        jLabel13.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel13.setForeground(new java.awt.Color(255, 255, 255));
        jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel13.setText("T");

        jLabel14.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel14.setForeground(new java.awt.Color(255, 255, 255));
        jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel14.setText("S");

        jLabel15.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel15.setForeground(new java.awt.Color(255, 255, 255));
        jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel15.setText("M");

        jLabel16.setFont(new java.awt.Font("Segoe UI Symbol", 1, 60)); // NOI18N
        jLabel16.setForeground(new java.awt.Color(255, 255, 255));
        jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel16.setText("E");

        javax.swing.GroupLayout SysTxLayout = new javax.swing.GroupLayout(SysTx);
        SysTx.setLayout(SysTxLayout);
        SysTxLayout.setHorizontalGroup(
            SysTxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)
            .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        SysTxLayout.setVerticalGroup(
            SysTxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(SysTxLayout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(25, 25, 25))
        );

        Mainf.add(SysTx, new org.netbeans.lib.awtextra.AbsoluteConstraints(1370, 120, -1, -1));

        jPanel1.setBackground(new java.awt.Color(0, 0, 0));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1100, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        Mainf.add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 810, 1100, 10));

        jLabel21.setBackground(new java.awt.Color(255, 255, 255));
        jLabel21.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/LOGO.png"))); // NOI18N
        jLabel21.setOpaque(true);
        Mainf.add(jLabel21, new org.netbeans.lib.awtextra.AbsoluteConstraints(600, 70, 280, 160));

        jLabel17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/lance.jpg"))); // NOI18N
        Mainf.add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1460, 820));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(Mainf, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(Mainf, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE)
        );

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

    private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel3MouseClicked
System.exit(0);     
// TODO add your handling code here:
    }//GEN-LAST:event_jLabel3MouseClicked

    private void jLabel3MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel3MouseEntered
jLabel3.setBackground(new Color(255,51,51));
// TODO add your handling code here:
    }//GEN-LAST:event_jLabel3MouseEntered

    private void jLabel3MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel3MouseExited
      jLabel3.setBackground(new Color(51,0,51));
        // TODO add your handling code here:
    }//GEN-LAST:event_jLabel3MouseExited

    private void jLabel4MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel4MouseEntered
     jLabel4.setBackground(new Color(51,153,255));       
     // TODO add your handling code here:
    }//GEN-LAST:event_jLabel4MouseEntered

    private void jLabel4MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel4MouseExited
     jLabel4.setBackground(new Color(51,0,51));
        // TODO add your handling code here:
    }//GEN-LAST:event_jLabel4MouseExited

    private void s2FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_s2FocusGained
     s2.setBorder(new LineBorder(new Color(0,255,255),2));
     s2.setText(""); 

    }//GEN-LAST:event_s2FocusGained

    private void s3FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_s3FocusGained
       s3.setText(""); 
// TODO add your handling code here:
    }//GEN-LAST:event_s3FocusGained

    private void jLabel2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel2MouseClicked
int p=this.p3.getX();


p2.setBackground(new Color(255,255,255,0));
p3.setBackground(new Color(255,255,255,180));

   // ap.setVisible(true);    
    //a5.setVisible(true);  
    if(p>-1)
    {
        Animacion.Animacion.mover_derecha(150,805,2,8,p3);
    }
   
   
    p2.setVisible(false);
     p1.setVisible(true);
   up4.setVisible(true);
    a1.setVisible(false);
   // a2.setVisible(false);
    a3.setVisible(false);
    aid.setVisible(false);
    aps.setVisible(false);
    a4.setVisible(false);    
    a6.setVisible(false); 
    s1.setVisible(true);
    s2.setVisible(true);
    s3.setVisible(true);
    s4.setVisible(true);
    s5.setVisible(true);
    a6.setVisible(false);    
    s6.setVisible(true); 
    s7.setVisible(true);
    
    }//GEN-LAST:event_jLabel2MouseClicked

    private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1MouseClicked
int p=this.p3.getX();

 //jLabel1.setBackground( new Color(255,153,10));
  jLabel2.setBackground(new Color(0,0,0));
//m1.setVisible(true);
p2.setBackground(new Color(255,255,255,0));
p3.setBackground(new Color(255,255,255,180));
    if(p>-1)
    {
        Animacion.Animacion.mover_izquierda(805,200,2,8,p3);
    }
    
   
    
    
    p2.setVisible(true);
     p1.setVisible(false);
    
     up4.setVisible(false);
    up3.setVisible(true);
    s1.setVisible(false);
    s2.setVisible(false);
    s3.setVisible(false);
    s4.setVisible(false);
    s5.setVisible(false);
    s6.setVisible(false);
    s7.setVisible(false);
    a1.setVisible(true);
    //a2.setVisible(true);
    a3.setVisible(true);
    aid.setVisible(true);
    aps.setVisible(true);
    a4.setVisible(true);    
    a6.setVisible(true); 
   // ap.setVisible(true);    
   // a5.setVisible(true);     
          
        
// TODO add your handling code here:
    }//GEN-LAST:event_jLabel1MouseClicked

    private void s2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_s2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_s2ActionPerformed

    private void s2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_s2MouseClicked
      s2.setText("");  // TODO add your handling code here:
    }//GEN-LAST:event_s2MouseClicked

    private void jLabel4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel4MouseClicked

    
       
       
            setState(JFrame.ICONIFIED);
        
           // TODO add your handling code here:
    }//GEN-LAST:event_jLabel4MouseClicked

    private void a4MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_a4MouseEntered
       //a4.setBorder(new LineBorder(Color.red,2));
        
        a4.setBackground(new Color(0,0,0));
        // TODO add your handling code here:
    }//GEN-LAST:event_a4MouseEntered

    private void a4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_a4MouseClicked
      
        String user=aid.getText();
        String pass=aps.getText(); 
        String currentDir=System.getProperty("user.dir");
        try
   {  
       Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
      Connection con= DriverManager.getConnection("jdbc:derby:"+currentDir+"\\Ranvijay", "maindata","1234");
      String sql;
            sql = "SELECT AID,APS FROM MAINDATA.ADMLOG WHERE AID=? AND APS=?";
      PreparedStatement pt=con.prepareStatement(sql);
      pt.setString(1,user);
      pt.setString(2,pass);
      ResultSet rs= pt.executeQuery();
      if (rs.next())
      {  
          String uid[]=new String[1];
           //String ups[]=new String[2];
         uid[0]=rs.getString("AID");
         //uid[1]=rs.getString("APS");
        AdminPage.main(uid);
        //AdminPage.main(ups);
         this.dispose();  
      }
      else
      {JOptionPane.showMessageDialog(null, "Invalid Login Details Please Try Again");
      } }
catch(SQLException e1)
   {  JOptionPane.showMessageDialog(null,e1.getMessage());
   }    catch (ClassNotFoundException ex) {
            Logger.getLogger(A_Login_Page.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        
 // TODO add your handling code here:
    }//GEN-LAST:event_a4MouseClicked

    private void apsFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_apsFocusGained
       aps.setBorder(new LineBorder(new Color(0,255,255),2));
       aps.setText("");
        // TODO add your handling code here:
    }//GEN-LAST:event_apsFocusGained

    private void aidMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_aidMouseClicked
 aid.setBorder(new LineBorder(new Color(0,255,255),2));
        aid.setText("");
        // TODO add your handling code here:
    }//GEN-LAST:event_aidMouseClicked

    private void aidFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_aidFocusGained
        aid.setBorder(new LineBorder(new Color(0,255,255),2));
        aid.setText("");
        // TODO add your handling code here:
    }//GEN-LAST:event_aidFocusGained

    private void jLabel1MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1MouseEntered
     jLabel1.setBackground(new Color(255,255,255));
     jLabel1.setForeground(new Color(0,0,0));
     // TODO add your handling code here:
    }//GEN-LAST:event_jLabel1MouseEntered

    private void jLabel1MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1MouseExited
        // TODO add your handling code here:
         jLabel1.setBackground(new Color(0,0,0));
         jLabel1.setForeground(new Color(255,255,255));
    }//GEN-LAST:event_jLabel1MouseExited

    private void jLabel2MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel2MouseEntered
        // TODO add your handling code here:
        jLabel2.setBackground(new Color(255,255,255));
        jLabel2.setForeground(new Color(0,0,0));
    }//GEN-LAST:event_jLabel2MouseEntered

    private void jLabel2MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel2MouseExited
        // TODO add your handling code here:
         jLabel2.setBackground(new Color(0,0,0));
         jLabel2.setForeground(new Color(255,255,255));
    }//GEN-LAST:event_jLabel2MouseExited

    private void a4MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_a4MouseExited
        // TODO add your handling code here:
        a4.setBackground(new Color(0,0,204));
    }//GEN-LAST:event_a4MouseExited

    private void s6MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_s6MouseEntered
        // TODO add your handling code here:
        s6.setBackground(new Color(0,0,0));
    }//GEN-LAST:event_s6MouseEntered

    private void s6MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_s6MouseExited
        // TODO add your handling code here:
         s6.setBackground(new Color(0,0,204));
    }//GEN-LAST:event_s6MouseExited

    private void a6MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_a6MouseEntered
        // TODO add your handling code here:
         a6.setBackground(new Color(0,0,0));
    }//GEN-LAST:event_a6MouseEntered

    private void a6MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_a6MouseExited
        // TODO add your handling code here:
        a6.setBackground(new Color(153,153,153));
    }//GEN-LAST:event_a6MouseExited

    private void s7MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_s7MouseEntered
        // TODO add your handling code here:
        s7.setBackground(new Color(0,0,0));
    }//GEN-LAST:event_s7MouseEntered

    private void s7MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_s7MouseExited
        // TODO add your handling code here:
        s7.setBackground(new Color(153,153,153));
    }//GEN-LAST:event_s7MouseExited

    private void jPanel2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel2MouseClicked
x=evt.getX();
y=evt.getY();
// TODO add your handling code here:
    }//GEN-LAST:event_jPanel2MouseClicked

    private void jPanel2MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel2MouseDragged

        this.setLocation(this.getLocation().x+evt.getX()-x,this.getLocation().y+evt.getY()-y);        // TODO add your handling code here:
    }//GEN-LAST:event_jPanel2MouseDragged

    private void apsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_apsMouseClicked
      aps.setBorder(new LineBorder(new Color(0,255,255),2));
      aps.setText("");
      
      
       

// TODO add your handling code here:
    }//GEN-LAST:event_apsMouseClicked

    private void aidFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_aidFocusLost
     aid.setBorder(new LineBorder(new Color(0,0,0,0)));   // TODO add your handling code here:
    }//GEN-LAST:event_aidFocusLost

    private void apsFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_apsFocusLost
      aps.setBorder(new LineBorder(new Color(0,0,0,0)));   // TODO add your handling code here:
    }//GEN-LAST:event_apsFocusLost

    private void s2FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_s2FocusLost
       s2.setBorder(new LineBorder(new Color(0,0,0,0)));  // TODO add your handling code here:
    }//GEN-LAST:event_s2FocusLost

    private void s3FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_s3FocusLost
      s3.setBorder(new LineBorder(new Color(0,0,0,0)));   // TODO add your handling code here:
    }//GEN-LAST:event_s3FocusLost

    private void s6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_s6MouseClicked
         String id=s2.getText();
        String pass=s3.getText();
        String currentDir=System.getProperty("user.dir");
        try
   {  
       Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
      Connection con= DriverManager.getConnection("jdbc:derby:"+currentDir+"\\Ranvijay", "maindata","1234");
      String sql="SELECT EID,EPS FROM MAINDATA.EMPLOG WHERE EID=? AND EPS=?";
      PreparedStatement pt=con.prepareStatement(sql);
      pt.setString(1,id);
      pt.setString(2,pass);
      ResultSet rs= pt.executeQuery();
      if (rs.next())
      {  
         String uid[]=new String[1];
         //String ups[]=new String[2];
         uid[0]=rs.getString("EID");
         //ups[1]=rs.getString("EPS");
         SP.main(uid);
         //  SP.main(ups);
         this.dispose();  
      }
      else
      {
        
          System.out.println("Users Not Found");  
      }
      
          
   }
catch(SQLException e1)
   {
       e1.printStackTrace();
   }    catch (ClassNotFoundException ex) {      
            Logger.getLogger(A_Login_Page.class.getName()).log(Level.SEVERE, null, ex);
        }      
   
    }//GEN-LAST:event_s6MouseClicked

    private void jLabel22MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel22MouseEntered
       jLabel22.setBackground( new Color(255,102,102));
        jLabel22.setForeground( new Color(255,255,255));       
// TODO add your handling code here:
    }//GEN-LAST:event_jLabel22MouseEntered

    private void jLabel22MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel22MouseExited
 jLabel22.setForeground( new Color(255,102,102));
        jLabel22.setBackground( new Color(255,255,255));              


// TODO add your handling code here:
    }//GEN-LAST:event_jLabel22MouseExited

    private void jLabel22MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel22MouseClicked
        A_Login_Page ap=new A_Login_Page();
      ap.setVisible(true);
          ap.pack();
          ap.setLocationRelativeTo(null);
          ap.setDefaultCloseOperation(A_Login_Page.EXIT_ON_CLOSE);
          this.dispose();
          // TODO add your handling code here:
    }//GEN-LAST:event_jLabel22MouseClicked

    private void jLabel23MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel23MouseClicked
     A_Login_Page ap=new A_Login_Page();
      ap.setVisible(true);
          ap.pack();
          ap.setLocationRelativeTo(null);
          ap.setDefaultCloseOperation(A_Login_Page.EXIT_ON_CLOSE);
          this.dispose(); 
    }//GEN-LAST:event_jLabel23MouseClicked

    private void jLabel23MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel23MouseEntered
       jLabel23.setBackground( new Color(255,102,102));
        jLabel23.setForeground( new Color(255,255,255));     // TODO add your handling code here:
    }//GEN-LAST:event_jLabel23MouseEntered

    private void jLabel23MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel23MouseExited
        jLabel23.setForeground( new Color(255,102,102));
        jLabel23.setBackground( new Color(255,255,255));      // TODO add your handling code here:
    }//GEN-LAST:event_jLabel23MouseExited

    private void a6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_a6MouseClicked
       AdminPss ap = new AdminPss();
            ap.setVisible(true);
            ap.pack();
            ap.setLocationRelativeTo(null);
            ap.setDefaultCloseOperation(A_Login_Page.EXIT_ON_CLOSE);
            this.dispose();
    }//GEN-LAST:event_a6MouseClicked

    private void s7MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_s7MouseClicked
       SLPss ap = new SLPss();
            ap.setVisible(true);
            ap.pack();
            ap.setLocationRelativeTo(null);
            ap.setDefaultCloseOperation(A_Login_Page.EXIT_ON_CLOSE);
            this.dispose();
    }//GEN-LAST:event_s7MouseClicked

    private void jPanel2MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel2MouseEntered
        x=evt.getX();
y=evt.getY();
    }//GEN-LAST:event_jPanel2MouseEntered

    private void jPanel2MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel2MousePressed
        x=evt.getX();
y=evt.getY();
    }//GEN-LAST:event_jPanel2MousePressed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(A_Login_Page.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(A_Login_Page.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(A_Login_Page.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(A_Login_Page.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new A_Login_Page().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel LoginTx;
    private javax.swing.JPanel Mainf;
    private javax.swing.JPanel SysTx;
    private javax.swing.JLabel a1;
    private javax.swing.JLabel a3;
    private javax.swing.JLabel a4;
    private javax.swing.JLabel a5;
    private javax.swing.JLabel a6;
    private javax.swing.JPanel admbtn;
    private javax.swing.JTextField aid;
    private javax.swing.JPasswordField aps;
    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 jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    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.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel p1;
    private javax.swing.JPanel p2;
    private javax.swing.JPanel p3;
    private javax.swing.JLabel s1;
    private javax.swing.JTextField s2;
    private javax.swing.JPasswordField s3;
    private javax.swing.JLabel s4;
    private javax.swing.JLabel s5;
    private javax.swing.JLabel s6;
    private javax.swing.JLabel s7;
    private javax.swing.JPanel salbtn;
    private javax.swing.JPanel up3;
    private javax.swing.JPanel up4;
    // End of variables declaration//GEN-END:variables
}
