Subordinate.request.java Source code

Java tutorial

Introduction

Here is the source code for Subordinate.request.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Subordinate;

import Rmanager.Connection;
import Rmanager.Request;
import Rmanager.Subordinates;
import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Document;
import com.itextpdf.text.Element;
import com.itextpdf.text.Font;
import com.itextpdf.text.FontFactory;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
import java.awt.Desktop;
import java.awt.Toolkit;
import java.awt.font.TextAttribute;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import static java.lang.Integer.parseInt;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import login.login;

/**
 *
 * @author Reda ben
 */
public class request extends javax.swing.JFrame {

    /**
     * Creates new form request
     */
    public request() {
        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() {

        jLabel7 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel2 = 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();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setAutoRequestFocus(false);
        setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("../logo.png")));
        setMinimumSize(new java.awt.Dimension(1000, 600));
        setUndecorated(true);
        setPreferredSize(new java.awt.Dimension(1000, 600));
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel7.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setText("1");
        getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(405, 104, 160, 30));

        jLabel5.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setToolTipText("");
        jLabel5.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(234, 354, 350, 30));

        jLabel6.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setToolTipText("");
        jLabel6.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(205, 310, 350, 30));

        jLabel4.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(255, 255, 255));
        jLabel4.setToolTipText("");
        jLabel4.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(222, 265, 350, 30));

        jLabel3.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setToolTipText("");
        jLabel3.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(197, 220, 350, 30));

        jLabel2.setFont(new java.awt.Font("Century Gothic", 1, 24)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setToolTipText("");
        jLabel2.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 177, 350, 30));

        jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/login/closebutton.png"))); // NOI18N
        jLabel9.setToolTipText("Close");
        jLabel9.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jLabel9.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel9.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel9MouseClicked(evt);
            }

            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel9MouseEntered(evt);
            }

            public void mousePressed(java.awt.event.MouseEvent evt) {
                jLabel9MousePressed(evt);
            }
        });
        getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(940, 10, -1, -1));

        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/login/minbutton.png"))); // NOI18N
        jLabel10.setToolTipText("Minimize");
        jLabel10.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel10.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel10MouseClicked(evt);
            }
        });
        getContentPane().add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(890, 10, -1, -1));

        jLabel11.setFont(new java.awt.Font("Berlin Sans FB", 1, 18)); // NOI18N
        jLabel11.setForeground(new java.awt.Color(73, 73, 73));
        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel11.setText("Name");
        getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 30, 160, 50));

        jLabel12.setFont(new java.awt.Font("Berlin Sans FB", 1, 24)); // NOI18N
        jLabel12.setForeground(new java.awt.Color(73, 73, 73));
        jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel12.setText("Team");
        getContentPane().add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, 100, 50));

        jLabel13.setFont(new java.awt.Font("Berlin Sans FB", 1, 28)); // NOI18N
        jLabel13.setForeground(new java.awt.Color(204, 204, 204));
        jLabel13.setText("|");
        getContentPane().add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 30, -1, 50));

        jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Subordinate/sendr.png"))); // NOI18N
        jLabel14.setText("jLabel14");
        jLabel14.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel14.setMaximumSize(new java.awt.Dimension(168, 55));
        jLabel14.setMinimumSize(new java.awt.Dimension(168, 55));
        jLabel14.setPreferredSize(new java.awt.Dimension(168, 55));
        jLabel14.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel14MouseClicked(evt);
            }

            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel14MouseEntered(evt);
            }

            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLabel14MouseExited(evt);
            }

            public void mousePressed(java.awt.event.MouseEvent evt) {
                jLabel14MousePressed(evt);
            }

            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLabel14MouseReleased(evt);
            }
        });
        getContentPane().add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(810, 210, 168, 55));

        jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Subordinate/print.png"))); // NOI18N
        jLabel15.setText("jLabel14");
        jLabel15.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel15.setMaximumSize(new java.awt.Dimension(168, 55));
        jLabel15.setMinimumSize(new java.awt.Dimension(168, 55));
        jLabel15.setPreferredSize(new java.awt.Dimension(168, 55));
        jLabel15.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel15MouseClicked(evt);
            }

            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel15MouseEntered(evt);
            }

            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLabel15MouseExited(evt);
            }

            public void mousePressed(java.awt.event.MouseEvent evt) {
                jLabel15MousePressed(evt);
            }

            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLabel15MouseReleased(evt);
            }
        });
        getContentPane().add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(810, 140, 168, 55));

        jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Subordinate/left164h.png"))); // NOI18N
        jLabel16.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel16.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel16MouseClicked(evt);
            }

            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLabel16MouseEntered(evt);
            }

            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLabel16MouseExited(evt);
            }
        });
        getContentPane().add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 510, 150, 90));

        jLabel8.setMaximumSize(new java.awt.Dimension(210, 55));
        jLabel8.setMinimumSize(new java.awt.Dimension(210, 55));
        jLabel8.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                jLabel8MouseDragged(evt);
            }
        });
        jLabel8.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                jLabel8MousePressed(evt);
            }
        });
        getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(-6, 0, 1010, 600));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Subordinate/requ.png"))); // NOI18N
        getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1000, 600));

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

    private void jLabel9MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel9MouseClicked
        System.exit(0);
    }//GEN-LAST:event_jLabel9MouseClicked

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

    }//GEN-LAST:event_jLabel9MouseEntered

    private void jLabel9MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel9MousePressed
        // TODO add your handling code here:
    }//GEN-LAST:event_jLabel9MousePressed

    private void jLabel10MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel10MouseClicked
        this.setState(Sub.ICONIFIED);
    }//GEN-LAST:event_jLabel10MouseClicked

    int x, y;

    private void jLabel8MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel8MouseDragged
        this.setLocation((int) evt.getXOnScreen() - x, (int) evt.getYOnScreen() - y);
    }//GEN-LAST:event_jLabel8MouseDragged

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

    private void jLabel14MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel14MouseEntered
        jLabel14.setIcon(new ImageIcon(getClass().getResource("sendrh.png")));
    }//GEN-LAST:event_jLabel14MouseEntered

    private void jLabel14MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel14MouseExited
        jLabel14.setIcon(new ImageIcon(getClass().getResource("sendr.png")));
    }//GEN-LAST:event_jLabel14MouseExited

    private void jLabel14MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel14MousePressed
        jLabel14.setIcon(new ImageIcon(getClass().getResource("sendrp.png")));
    }//GEN-LAST:event_jLabel14MousePressed

    private void jLabel14MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel14MouseReleased
        jLabel14.setIcon(new ImageIcon(getClass().getResource("sendrh.png")));
    }//GEN-LAST:event_jLabel14MouseReleased

    private void jLabel14MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel14MouseClicked
        new Sendreq().setVisible(true);
    }//GEN-LAST:event_jLabel14MouseClicked

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        try {
            this.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - 500,
                    Toolkit.getDefaultToolkit().getScreenSize().height / 2 - 300);
            subordonate();
            request();
            Initialize();
        } catch (SQLException | ClassNotFoundException | IOException ex) {
            Logger.getLogger(request.class.getName()).log(Level.SEVERE, null, ex);
        }

    }//GEN-LAST:event_formWindowOpened

    private void jLabel15MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel15MouseClicked
        Document document = new Document();
        try {
            PdfWriter.getInstance(document, new FileOutputStream("printreq.pdf"));
            document.open();

            SimpleDateFormat td = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date now = new Date();
            String tdnow = td.format(now);

            Paragraph paragraph = new Paragraph(ALLBITS);
            paragraph.add(new Paragraph(tdnow));
            paragraph.add(new Paragraph("Request : \n\n",
                    FontFactory.getFont(FontFactory.COURIER_BOLD, 20, Font.BOLD, BaseColor.DARK_GRAY)));
            document.add(paragraph);
            PdfPTable table = new PdfPTable(2);
            table.addCell("ID Request :");
            table.addCell(request.intGetter("idRequest") + "");
            table.addCell("Request type :");
            table.addCell(request.stringGetter("requestType"));
            table.addCell("Client name :");
            table.addCell(request.stringGetter("clientName"));
            table.addCell("Phone number :");
            table.addCell(request.stringGetter("clientTel"));
            table.addCell("Address 1 :");
            table.addCell(request.stringGetter("address1"));
            table.addCell("Address 2 :");
            table.addCell(request.stringGetter("address2"));
            document.add(table);
            document.close();
            /* Open Pdf */
            Desktop desktop = Desktop.getDesktop();
            if (desktop.isSupported(Desktop.Action.OPEN)) {
                desktop.open(new File("printreq.pdf"));
            } else {
                System.out.println("Open is not supported");
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }//GEN-LAST:event_jLabel15MouseClicked

    private void jLabel15MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel15MouseEntered
        jLabel15.setIcon(new ImageIcon(getClass().getResource("printh.png")));
    }//GEN-LAST:event_jLabel15MouseEntered

    private void jLabel15MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel15MouseExited
        jLabel15.setIcon(new ImageIcon(getClass().getResource("print.png")));
    }//GEN-LAST:event_jLabel15MouseExited

    private void jLabel15MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel15MousePressed
        jLabel15.setIcon(new ImageIcon(getClass().getResource("printp.png")));
    }//GEN-LAST:event_jLabel15MousePressed

    private void jLabel15MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel15MouseReleased
        jLabel15.setIcon(new ImageIcon(getClass().getResource("printh.png")));
    }//GEN-LAST:event_jLabel15MouseReleased

    private void jLabel16MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel16MouseEntered
        jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Subordinate/left164.png")));
    }//GEN-LAST:event_jLabel16MouseEntered

    private void jLabel16MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel16MouseExited
        jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Subordinate/left164h.png")));
    }//GEN-LAST:event_jLabel16MouseExited

    private void jLabel16MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel16MouseClicked
        this.dispose();
        new Sub().setVisible(true);
    }//GEN-LAST:event_jLabel16MouseClicked

    /**
     * **********************************
     * ----------Functions--------------* ***********************************
     */
    // Creating user object 
    public void subordonate() throws SQLException, ClassNotFoundException, IOException {
        connect = new Connection();
        Statement stmt = connect.con.createStatement();
        FileReader fr;
        try {
            fr = new FileReader("user.txt");
            BufferedReader br = new BufferedReader(fr);
            int iduser = parseInt(br.readLine());
            String SQL = "SELECT * FROM user where ID_USER =" + iduser;
            ResultSet results = stmt.executeQuery(SQL);
            results.next();
            subordinate = new Subordinates(parseInt(results.getString("id_user")),
                    parseInt(results.getString("idteam")), results.getString("name"), results.getString("lastname"),
                    results.getString("nid"), results.getString("position"), results.getString("password"));
        } catch (FileNotFoundException ex) {
            System.out.println("file not found");
        }
    }

    // Creating request object 
    public void request() throws SQLException, ClassNotFoundException, IOException {
        connect = new Connection();
        Statement stmt = connect.con.createStatement();
        FileReader fr;
        try {
            fr = new FileReader("request.txt");
            BufferedReader br = new BufferedReader(fr);
            int idrequest = parseInt(br.readLine());
            String SQL = "SELECT * FROM request where idrequest =" + idrequest;
            ResultSet results = stmt.executeQuery(SQL);
            results.next();
            boolean s = false, e = false, v = false;
            if (parseInt(results.getString("seen")) == 0 || parseInt(results.getString("seen")) == 1) {
                s = false;
            }
            if (parseInt(results.getString("seen")) == 2) {
                s = true;
            }
            if (parseInt(results.getString("error")) == 0 || parseInt(results.getString("error")) == 1) {
                e = false;
            }
            if (parseInt(results.getString("error")) == 2) {
                e = true;
            }
            if (parseInt(results.getString("finished")) == 0 || parseInt(results.getString("finished")) == 1) {
                v = false;
            }
            if (parseInt(results.getString("finished")) == 2) {
                v = true;
            }
            String type = "";
            if (parseInt(results.getString("id_type")) == 1) {
                type = "Instalation";
            }
            if (parseInt(results.getString("id_type")) == 2) {
                type = "Transfer";
            }
            if (parseInt(results.getString("id_type")) == 3) {
                type = "Maintenamce";
            }
            String sDd;
            if (!results.getString("seendate").equals("0000-00-00")) {
                sDd = results.getString("seendate").substring(0, 4) + "/"
                        + results.getString("seendate").substring(5, 7) + "/"
                        + results.getString("seendate").substring(8, 10);
            } else {
                sDd = "0000/00/00";
            }
            Date sD = new Date(sDd);
            if (!results.getString("ERRORDATE").equals("0000-00-00")) {
                sDd = results.getString("ERRORDATE").substring(0, 4) + "/"
                        + results.getString("ERRORDATE").substring(5, 7) + "/"
                        + results.getString("ERRORDATE").substring(8, 10);
            } else {
                sDd = "0000/00/00";
            }
            Date eD = new Date(sDd);
            if (!results.getString("FINISHEDDATE").equals("0000-00-00")) {
                sDd = results.getString("FINISHEDDATE").substring(0, 4) + "/"
                        + results.getString("FINISHEDDATE").substring(5, 7) + "/"
                        + results.getString("FINISHEDDATE").substring(8, 10);
            } else {
                sDd = "0000/00/00";
            }
            Date vD = new Date(sDd);
            request = new Request(parseInt(results.getString("idrequest")), results.getString("telclient"),
                    results.getString("address1"), results.getString("address2"), results.getString("clientname"),
                    s, v, e, sD, eD, vD, type, "wifi", parseInt(results.getString("id_user")),
                    parseInt(results.getString("idteam")));
        } catch (FileNotFoundException ex) {
            System.out.println("file not found");
        }
    }

    // Initialize jLabels 
    public void Initialize() {
        jLabel2.setText(request.stringGetter("requestType"));
        jLabel3.setText(request.stringGetter("clientName"));
        jLabel4.setText(request.stringGetter("clientTel"));
        jLabel6.setText(request.stringGetter("address1"));
        jLabel5.setText(request.stringGetter("address2"));
        jLabel7.setText(request.intGetter("idRequest") + "");
        jLabel12.setText(jLabel12.getText() + " " + subordinate.intGetter("idTeam"));
        jLabel11.setText(subordinate.getter("name") + " " + subordinate.getter("lname"));
    }

    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<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(request.class.getName()).log(java.util.logging.Level.SEVERE, null,
                    ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(request.class.getName()).log(java.util.logging.Level.SEVERE, null,
                    ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(request.class.getName()).log(java.util.logging.Level.SEVERE, null,
                    ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(request.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 request().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    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 jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    // End of variables declaration//GEN-END:variables
    //Addedd Variables
    public Subordinates subordinate;
    public Request request;
    public Connection connect;

}