client.welcome2.java Source code

Java tutorial

Introduction

Here is the source code for client.welcome2.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 client;

import java.util.Date;
import java.sql.*;
import javax.swing.JOptionPane;
import java.awt.*;
import net.proteanit.sql.DbUtils;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartFrame;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.general.DefaultPieDataset;
import java.awt.Desktop;
import java.io.File;
import java.lang.Object;
import java.nio.channels.FileChannel;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.filechooser.FileNameExtensionFilter;
import net.proteanit.sql.DbUtils;
import java.io.FileOutputStream;
import java.text.DecimalFormat;

import com.itextpdf.text.BaseColor;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Element;
import com.itextpdf.text.Font;
import com.itextpdf.text.Font.FontFamily;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
import java.io.FileNotFoundException;
import com.itextpdf.text.Image;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.concurrent.ThreadLocalRandom;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.BorderFactory;

/**
 *
 * @author Adi Malka
 * @author Felix Vainer
 */
/** 
* This class display all the options that a user with a level 2 permission has  
*/
public class welcome2 extends javax.swing.JFrame {
    static Connection conn = loginGUI.conn;
    static PreparedStatement pst = null;
    static ResultSet rs = null;
    public String filename_supplier;
    public String supplier_filename_update;
    public String supplier_filename_show_contract;
    public String filename_show_report;
    public String sn;
    public String fn;
    String tableClick;
    String searchmethod;
    boolean openClose;
    String sFileName;
    String report_status;

    /**
     * Creates new form welcome
     */
    public welcome2() {
        initComponents();
        reportsTab.setVisible(false);
        suppliersTab.setVisible(false);
        dropManageUserLabel.setVisible(false);
        changePasswordLabel.setVisible(false);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        SearchHistoryGroup = new javax.swing.ButtonGroup();
        ProjectReportGroup = new javax.swing.ButtonGroup();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        logoutButton = new javax.swing.JButton();
        suppliersButton = new javax.swing.JButton();
        reportsButton = new javax.swing.JButton();
        jLayeredPane1 = new javax.swing.JLayeredPane();
        suppliersTab = new javax.swing.JTabbedPane();
        AddSupplierPanel = new javax.swing.JPanel();
        SupplierIDLabel = new javax.swing.JLabel();
        SupplierIDText = new javax.swing.JTextField();
        SupplierNameLabel = new javax.swing.JLabel();
        SupplierNameText = new javax.swing.JTextField();
        SupplierAddressLabel = new javax.swing.JLabel();
        SupplierAddressText = new javax.swing.JTextField();
        SupplierPhoneLabel = new javax.swing.JLabel();
        SupplierPhoneText = new javax.swing.JTextField();
        SupplierEmailLabel = new javax.swing.JLabel();
        SupplierEmailText = new javax.swing.JTextField();
        SupplierContractPanel = new javax.swing.JPanel();
        SupplierlContractLabel = new javax.swing.JLabel();
        SupplierContractIDLabel = new javax.swing.JLabel();
        SupplierContracdIDText = new javax.swing.JTextField();
        SupplierUploadText = new javax.swing.JTextField();
        SupplierUploadContractButton = new javax.swing.JButton();
        SupplierShowContractButton = new javax.swing.JButton();
        SupplierAddButton = new javax.swing.JButton();
        ClearButton = new javax.swing.JButton();
        background_green1 = new javax.swing.JLabel();
        UpdateSupplierPanel = new javax.swing.JPanel();
        SupplierSearchText1 = new javax.swing.JTextField();
        EnterYourSearchLabel6 = new javax.swing.JLabel();
        SupplierIdRadioButton = new javax.swing.JRadioButton();
        SupplierNameRadioButton = new javax.swing.JRadioButton();
        SupplierSearchButton = new javax.swing.JButton();
        SupplierNameLabel1 = new javax.swing.JLabel();
        SupplierNameText1 = new javax.swing.JTextField();
        SupplierAddressLabel1 = new javax.swing.JLabel();
        SupplierAddressText1 = new javax.swing.JTextField();
        SupplierPhoneText1 = new javax.swing.JTextField();
        SupplierPhoneLabel1 = new javax.swing.JLabel();
        SupplierEmailLabel1 = new javax.swing.JLabel();
        SupplierEmailText1 = new javax.swing.JTextField();
        jScrollPane17 = new javax.swing.JScrollPane();
        SuppliersTable = new javax.swing.JTable();
        SupplierUpdateButton = new javax.swing.JButton();
        SupplierDeleteButton = new javax.swing.JButton();
        SupplierRefreshButton = new javax.swing.JButton();
        ContractPanel = new javax.swing.JPanel();
        contract_Label1 = new javax.swing.JLabel();
        SupplierUploadText1 = new javax.swing.JTextField();
        SupplierUploadContractButton1 = new javax.swing.JButton();
        jLabel42 = new javax.swing.JLabel();
        SupplierShowButton = new javax.swing.JButton();
        SupplierContractIDLabel1 = new javax.swing.JLabel();
        SupplierContractIDText1 = new javax.swing.JTextField();
        background_green2 = new javax.swing.JLabel();
        SearchSupplierPanel = new javax.swing.JPanel();
        jScrollPane18 = new javax.swing.JScrollPane();
        SuppliersSearchTable = new javax.swing.JTable();
        SupplierRefreshButton1 = new javax.swing.JButton();
        EnterYourSearchLabel7 = new javax.swing.JLabel();
        SupplierSearchText2 = new javax.swing.JTextField();
        SupplierIdRadioButton1 = new javax.swing.JRadioButton();
        SupplierNameRadioButton1 = new javax.swing.JRadioButton();
        SupplierSearchButton1 = new javax.swing.JButton();
        Supplier_Show_Contract_Button = new javax.swing.JButton();
        background_green3 = new javax.swing.JLabel();
        SupplierContractIDText2 = new javax.swing.JTextField();
        projectsTab = new javax.swing.JTabbedPane();
        AddProjectPanel = new javax.swing.JPanel();
        projIDtxt = new javax.swing.JTextField();
        projNametxt = new javax.swing.JTextField();
        projStartDate = new com.toedter.calendar.JDateChooser();
        projDueDate = new com.toedter.calendar.JDateChooser();
        jScrollPane13 = new javax.swing.JScrollPane();
        projDesctxt = new javax.swing.JTextArea();
        projAddButton = new javax.swing.JButton();
        projClearButton = new javax.swing.JButton();
        ProjectIDLabel = new javax.swing.JLabel();
        ProjectNameLabel = new javax.swing.JLabel();
        ProjectStartdateLabel = new javax.swing.JLabel();
        ProjectDuedateLabel = new javax.swing.JLabel();
        ProjectCommentsLabel = new javax.swing.JLabel();
        background_green11 = new javax.swing.JLabel();
        StatusProjectPanel = new javax.swing.JPanel();
        jScrollPane14 = new javax.swing.JScrollPane();
        projUpTable = new javax.swing.JTable();
        projUpDueDate = new com.toedter.calendar.JDateChooser();
        projUpStatusChoice = new java.awt.Choice();
        projUpStatusButton = new javax.swing.JButton();
        projUpRefreshButton = new javax.swing.JButton();
        projUpSearchButton = new javax.swing.JButton();
        projSearchUptxt = new javax.swing.JTextField();
        projNameRadioButton = new javax.swing.JRadioButton();
        projIDRadioButton = new javax.swing.JRadioButton();
        jScrollPane15 = new javax.swing.JScrollPane();
        projComUptxt = new javax.swing.JTextArea();
        EnterYourSearchLabel9 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        background_green12 = new javax.swing.JLabel();
        SearchProjectPanel = new javax.swing.JPanel();
        projSearchtxt = new javax.swing.JTextField();
        projSearchButton = new javax.swing.JButton();
        projNameRadioButton1 = new javax.swing.JRadioButton();
        projIDRadioButton1 = new javax.swing.JRadioButton();
        jScrollPane16 = new javax.swing.JScrollPane();
        projSearchTable = new javax.swing.JTable();
        projRefreshSearchButton = new javax.swing.JButton();
        EnterYourSearchLabel10 = new javax.swing.JLabel();
        background_green13 = new javax.swing.JLabel();
        reportsTab = new javax.swing.JTabbedPane();
        ProjectReportPanel = new javax.swing.JPanel();
        genRepButton = new javax.swing.JToggleButton();
        pBeginDateChooser = new com.toedter.calendar.JDateChooser();
        pEndDateChooser = new com.toedter.calendar.JDateChooser();
        jLabel2 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        Show_report_Button = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        PendingRadioButton = new javax.swing.JRadioButton();
        AllRadioButton = new javax.swing.JRadioButton();
        ProgressRadioButton = new javax.swing.JRadioButton();
        CompletedRadioButton = new javax.swing.JRadioButton();
        background_green15 = new javax.swing.JLabel();
        HistoryPanel = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        repHistoryTable = new javax.swing.JTable();
        repSearchButton = new javax.swing.JButton();
        repDateSearchtxt = new com.toedter.calendar.JDateChooser();
        searchRepDateRadioButton = new javax.swing.JRadioButton();
        searchRepIDRadioButton = new javax.swing.JRadioButton();
        searchRepStatRadioButton = new javax.swing.JRadioButton();
        repIDSearchtxt = new javax.swing.JTextField();
        showRepSearchButton = new javax.swing.JButton();
        repProjStatchoice = new java.awt.Choice();
        EnterYourSearchLabel2 = new javax.swing.JLabel();
        RefreshButton2 = new javax.swing.JButton();
        background_green16 = new javax.swing.JLabel();
        projectsButton = new javax.swing.JButton();
        jLabel9 = new javax.swing.JLabel();
        manageUserButtonLabel = new javax.swing.JLabel();
        changePasswordLabel = new javax.swing.JLabel();
        dropManageUserLabel = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setUndecorated(true);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel3.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                jLabel3MouseMoved(evt);
            }
        });
        jLabel3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel3MouseClicked(evt);
            }
        });
        getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(1151, 3, 35, 22));

        jLabel4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel4MouseClicked(evt);
            }
        });
        getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(1223, 4, 55, 20));

        jSeparator1.setPreferredSize(new java.awt.Dimension(55, 10));
        getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 222, 1240, 10));

        logoutButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/logout button.png"))); // NOI18N
        logoutButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                logoutButtonActionPerformed(evt);
            }
        });
        getContentPane().add(logoutButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 100, 30, 30));

        suppliersButton
                .setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Suppliers icon 53 x 50.png"))); // NOI18N
        suppliersButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                suppliersButtonActionPerformed(evt);
            }
        });
        getContentPane().add(suppliersButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 110, 65, 60));

        reportsButton
                .setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Reports icon 53 x 50.png"))); // NOI18N
        reportsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                reportsButtonActionPerformed(evt);
            }
        });
        getContentPane().add(reportsButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 110, 65, 60));

        suppliersTab.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        suppliersTab.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                suppliersTabMouseClicked(evt);
            }
        });

        AddSupplierPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        SupplierIDLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierIDLabel.setText("Supplier ID");
        AddSupplierPanel.add(SupplierIDLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 70, -1, -1));

        SupplierIDText.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierIDTextActionPerformed(evt);
            }
        });
        AddSupplierPanel.add(SupplierIDText, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 70, 160, -1));

        SupplierNameLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierNameLabel.setText("Supplier Name");
        AddSupplierPanel.add(SupplierNameLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 110, -1, -1));

        SupplierNameText.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierNameTextActionPerformed(evt);
            }
        });
        AddSupplierPanel.add(SupplierNameText,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 110, 160, -1));

        SupplierAddressLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierAddressLabel.setText("Address");
        AddSupplierPanel.add(SupplierAddressLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 150, -1, -1));

        SupplierAddressText.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierAddressTextActionPerformed(evt);
            }
        });
        AddSupplierPanel.add(SupplierAddressText,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 150, 160, -1));

        SupplierPhoneLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierPhoneLabel.setText("Phone Number");
        AddSupplierPanel.add(SupplierPhoneLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 190, -1, -1));

        SupplierPhoneText.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierPhoneTextActionPerformed(evt);
            }
        });
        AddSupplierPanel.add(SupplierPhoneText,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 190, 160, -1));

        SupplierEmailLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierEmailLabel.setText("E-mail");
        AddSupplierPanel.add(SupplierEmailLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 230, -1, -1));

        SupplierEmailText.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierEmailTextActionPerformed(evt);
            }
        });
        AddSupplierPanel.add(SupplierEmailText,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 230, 160, -1));

        SupplierContractPanel.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        SupplierContractPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        SupplierlContractLabel.setFont(new java.awt.Font("Calibri", 0, 24)); // NOI18N
        SupplierlContractLabel.setText("Supplier Contract");
        SupplierContractPanel.add(SupplierlContractLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));

        SupplierContractIDLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierContractIDLabel.setText("Contract ID");
        SupplierContractPanel.add(SupplierContractIDLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 50, -1, -1));

        SupplierContracdIDText.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierContracdIDTextActionPerformed(evt);
            }
        });
        SupplierContractPanel.add(SupplierContracdIDText,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 50, 80, -1));

        SupplierUploadText.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierUploadTextActionPerformed(evt);
            }
        });
        SupplierContractPanel.add(SupplierUploadText,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 50, 150, -1));

        SupplierUploadContractButton.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
        SupplierUploadContractButton.setText("Upload");
        SupplierUploadContractButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierUploadContractButtonActionPerformed(evt);
            }
        });
        SupplierContractPanel.add(SupplierUploadContractButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 80, -1, -1));

        SupplierShowContractButton.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N
        SupplierShowContractButton.setText("Show");
        SupplierShowContractButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierShowContractButtonActionPerformed(evt);
            }
        });
        SupplierContractPanel.add(SupplierShowContractButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 80, 70, -1));

        AddSupplierPanel.add(SupplierContractPanel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 70, 387, 130));

        SupplierAddButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        SupplierAddButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/plus_icon.png"))); // NOI18N
        SupplierAddButton.setText("Add");
        SupplierAddButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierAddButtonActionPerformed(evt);
            }
        });
        AddSupplierPanel.add(SupplierAddButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 210, -1, -1));

        ClearButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        ClearButton.setText("Clear");
        ClearButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ClearButtonActionPerformed(evt);
            }
        });
        AddSupplierPanel.add(ClearButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 210, 100, 40));

        background_green1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N
        AddSupplierPanel.add(background_green1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440));

        suppliersTab.addTab("Add Suppliers", AddSupplierPanel);

        UpdateSupplierPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
        UpdateSupplierPanel.add(SupplierSearchText1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 160, -1));

        EnterYourSearchLabel6.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        EnterYourSearchLabel6.setText("Enter your search");
        UpdateSupplierPanel.add(EnterYourSearchLabel6,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1));

        SupplierIdRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierIdRadioButton.setText("By ID");
        SupplierIdRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        SupplierIdRadioButton.setBorderPainted(true);
        SupplierIdRadioButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        SupplierIdRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierIdRadioButtonActionPerformed(evt);
            }
        });
        UpdateSupplierPanel.add(SupplierIdRadioButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 60, -1));

        SupplierNameRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierNameRadioButton.setText("By Name");
        SupplierNameRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        SupplierNameRadioButton.setBorderPainted(true);
        SupplierNameRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierNameRadioButtonActionPerformed(evt);
            }
        });
        UpdateSupplierPanel.add(SupplierNameRadioButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 80, 90, -1));

        SupplierSearchButton.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        SupplierSearchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N
        SupplierSearchButton.setText("Search");
        SupplierSearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierSearchButtonActionPerformed(evt);
            }
        });
        UpdateSupplierPanel.add(SupplierSearchButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 40, -1, -1));

        SupplierNameLabel1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierNameLabel1.setText("Supplier Name");
        UpdateSupplierPanel.add(SupplierNameLabel1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 130, -1, -1));

        SupplierNameText1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierNameText1ActionPerformed(evt);
            }
        });
        UpdateSupplierPanel.add(SupplierNameText1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 130, 130, -1));

        SupplierAddressLabel1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierAddressLabel1.setText("Address");
        UpdateSupplierPanel.add(SupplierAddressLabel1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 170, 70, -1));

        SupplierAddressText1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierAddressText1ActionPerformed(evt);
            }
        });
        UpdateSupplierPanel.add(SupplierAddressText1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 170, 130, -1));

        SupplierPhoneText1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierPhoneText1ActionPerformed(evt);
            }
        });
        UpdateSupplierPanel.add(SupplierPhoneText1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 210, 130, -1));

        SupplierPhoneLabel1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierPhoneLabel1.setText("Phone");
        UpdateSupplierPanel.add(SupplierPhoneLabel1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 210, 70, -1));

        SupplierEmailLabel1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierEmailLabel1.setText("Email");
        UpdateSupplierPanel.add(SupplierEmailLabel1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 250, 70, -1));

        SupplierEmailText1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierEmailText1ActionPerformed(evt);
            }
        });
        UpdateSupplierPanel.add(SupplierEmailText1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 250, 130, -1));

        SuppliersTable
                .setModel(new javax.swing.table.DefaultTableModel(
                        new Object[][] { { null, null, null, null }, { null, null, null, null },
                                { null, null, null, null }, { null, null, null, null } },
                        new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
        SuppliersTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                SuppliersTableMouseClicked(evt);
            }
        });
        jScrollPane17.setViewportView(SuppliersTable);

        UpdateSupplierPanel.add(jScrollPane17,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 20, 810, 220));

        SupplierUpdateButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        SupplierUpdateButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/save-icon-30.png"))); // NOI18N
        SupplierUpdateButton.setText("Update");
        SupplierUpdateButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierUpdateButtonActionPerformed(evt);
            }
        });
        UpdateSupplierPanel.add(SupplierUpdateButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(740, 250, -1, -1));

        SupplierDeleteButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        SupplierDeleteButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/delete icon.png"))); // NOI18N
        SupplierDeleteButton.setText("Delete");
        SupplierDeleteButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierDeleteButtonActionPerformed(evt);
            }
        });
        UpdateSupplierPanel.add(SupplierDeleteButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(880, 250, -1, -1));

        SupplierRefreshButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        SupplierRefreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        SupplierRefreshButton.setText("Refresh");
        SupplierRefreshButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierRefreshButtonActionPerformed(evt);
            }
        });
        UpdateSupplierPanel.add(SupplierRefreshButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(1010, 250, -1, -1));

        ContractPanel.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        ContractPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        contract_Label1.setFont(new java.awt.Font("Calibri", 1, 24)); // NOI18N
        contract_Label1.setText("Contract Update");
        ContractPanel.add(contract_Label1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, 170, 30));

        SupplierUploadText1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierUploadText1ActionPerformed(evt);
            }
        });
        ContractPanel.add(SupplierUploadText1, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 40, 150, -1));

        SupplierUploadContractButton1.setText("Upload");
        SupplierUploadContractButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierUploadContractButton1ActionPerformed(evt);
            }
        });
        ContractPanel.add(SupplierUploadContractButton1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 90, -1, -1));

        jLabel42.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N
        jLabel42.setForeground(new java.awt.Color(255, 0, 0));
        jLabel42.setText("Please upload the new contract if changes are made");
        ContractPanel.add(jLabel42, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 70, -1, -1));

        SupplierShowButton.setText("Show");
        SupplierShowButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierShowButtonActionPerformed(evt);
            }
        });
        ContractPanel.add(SupplierShowButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 90, 70, -1));

        SupplierContractIDLabel1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierContractIDLabel1.setText("Contract ID");
        ContractPanel.add(SupplierContractIDLabel1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, -1, -1));

        SupplierContractIDText1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierContractIDText1ActionPerformed(evt);
            }
        });
        ContractPanel.add(SupplierContractIDText1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 40, 80, -1));

        UpdateSupplierPanel.add(ContractPanel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 250, 370, 130));

        background_green2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N
        UpdateSupplierPanel.add(background_green2,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -20, 1250, 450));

        suppliersTab.addTab("Update", UpdateSupplierPanel);

        SearchSupplierPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        SuppliersSearchTable
                .setModel(new javax.swing.table.DefaultTableModel(
                        new Object[][] { { null, null, null, null }, { null, null, null, null },
                                { null, null, null, null }, { null, null, null, null } },
                        new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
        SuppliersSearchTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                SuppliersSearchTableMouseClicked(evt);
            }
        });
        jScrollPane18.setViewportView(SuppliersSearchTable);

        SearchSupplierPanel.add(jScrollPane18,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 20, 810, 220));

        SupplierRefreshButton1.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        SupplierRefreshButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        SupplierRefreshButton1.setText("Refresh");
        SupplierRefreshButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierRefreshButton1ActionPerformed(evt);
            }
        });
        SearchSupplierPanel.add(SupplierRefreshButton1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(1010, 250, -1, -1));

        EnterYourSearchLabel7.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        EnterYourSearchLabel7.setText("Enter your search");
        SearchSupplierPanel.add(EnterYourSearchLabel7,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1));
        SearchSupplierPanel.add(SupplierSearchText2,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 160, -1));

        SupplierIdRadioButton1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierIdRadioButton1.setText("By ID");
        SupplierIdRadioButton1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        SupplierIdRadioButton1.setBorderPainted(true);
        SupplierIdRadioButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        SupplierIdRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierIdRadioButton1ActionPerformed(evt);
            }
        });
        SearchSupplierPanel.add(SupplierIdRadioButton1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 60, -1));

        SupplierNameRadioButton1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        SupplierNameRadioButton1.setText("By Name");
        SupplierNameRadioButton1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        SupplierNameRadioButton1.setBorderPainted(true);
        SupplierNameRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierNameRadioButton1ActionPerformed(evt);
            }
        });
        SearchSupplierPanel.add(SupplierNameRadioButton1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 80, 90, -1));

        SupplierSearchButton1.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        SupplierSearchButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N
        SupplierSearchButton1.setText("Search");
        SupplierSearchButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SupplierSearchButton1ActionPerformed(evt);
            }
        });
        SearchSupplierPanel.add(SupplierSearchButton1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 40, -1, -1));

        Supplier_Show_Contract_Button.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        Supplier_Show_Contract_Button
                .setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icon-service-contract.png"))); // NOI18N
        Supplier_Show_Contract_Button.setText("Show Contract");
        Supplier_Show_Contract_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Supplier_Show_Contract_ButtonActionPerformed(evt);
            }
        });
        SearchSupplierPanel.add(Supplier_Show_Contract_Button,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(810, 250, 190, 40));

        background_green3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N
        SearchSupplierPanel.add(background_green3,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -40, 1250, 460));

        SupplierContractIDText2.setText("jTextField1");
        SearchSupplierPanel.add(SupplierContractIDText2,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 200, -1, -1));

        suppliersTab.addTab("Search", SearchSupplierPanel);

        projectsTab.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        projectsTab.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                projectsTabMouseClicked(evt);
            }
        });

        AddProjectPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
        AddProjectPanel.add(projIDtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 70, 118, -1));
        AddProjectPanel.add(projNametxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 120, 120, -1));

        projStartDate.setDateFormatString("yyyy-MM-dd");
        projStartDate.setMinSelectableDate(new Date());
        AddProjectPanel.add(projStartDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 170, 127, -1));

        projDueDate.setMinSelectableDate(new Date());
        AddProjectPanel.add(projDueDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 220, 127, -1));

        projDesctxt.setColumns(10);
        projDesctxt.setRows(2);
        projDesctxt.setTabSize(0);
        jScrollPane13.setViewportView(projDesctxt);

        AddProjectPanel.add(jScrollPane13, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 260, 180, 70));

        projAddButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        projAddButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/plus_icon.png"))); // NOI18N
        projAddButton.setText("Add");
        projAddButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projAddButtonActionPerformed(evt);
            }
        });
        AddProjectPanel.add(projAddButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 330, -1, -1));

        projClearButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        projClearButton.setText("Clear");
        projClearButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projClearButtonActionPerformed(evt);
            }
        });
        AddProjectPanel.add(projClearButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 330, 100, 40));

        ProjectIDLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        ProjectIDLabel.setText("Project ID");
        AddProjectPanel.add(ProjectIDLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 70, -1, -1));

        ProjectNameLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        ProjectNameLabel.setText("Project Name");
        AddProjectPanel.add(ProjectNameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 120, -1, -1));

        ProjectStartdateLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        ProjectStartdateLabel.setText("Start Date");
        AddProjectPanel.add(ProjectStartdateLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 170, -1, -1));

        ProjectDuedateLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        ProjectDuedateLabel.setText("Due Date");
        AddProjectPanel.add(ProjectDuedateLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 220, -1, -1));

        ProjectCommentsLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        ProjectCommentsLabel.setText("Comments");
        AddProjectPanel.add(ProjectCommentsLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 270, -1, -1));

        background_green11.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        background_green11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N
        AddProjectPanel.add(background_green11,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -20, 1250, 430));

        projectsTab.addTab("Add Project", AddProjectPanel);

        StatusProjectPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        projUpTable.setModel(new javax.swing.table.DefaultTableModel(
                new Object[][] { { null, null, null, null, null, null }, { null, null, null, null, null, null },
                        { null, null, null, null, null, null }, { null, null, null, null, null, null } },
                new String[] { "Title 1", "Title 2", "Title 3", "Title 4", "Title 5", "Title 6" }));
        projUpTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                projUpTableMouseClicked(evt);
            }
        });
        jScrollPane14.setViewportView(projUpTable);

        StatusProjectPanel.add(jScrollPane14, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 20, 800, 220));

        projUpDueDate.setMinSelectableDate(new Date());
        StatusProjectPanel.add(projUpDueDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 130, 140, -1));

        projUpStatusChoice.addItem("Pending");
        projUpStatusChoice.addItem("In Progress");
        projUpStatusChoice.addItem("Completed");
        StatusProjectPanel.add(projUpStatusChoice,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 170, 100, -1));

        projUpStatusButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        projUpStatusButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/save-icon-30.png"))); // NOI18N
        projUpStatusButton.setText("Update");
        projUpStatusButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projUpStatusButtonActionPerformed(evt);
            }
        });
        StatusProjectPanel.add(projUpStatusButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(870, 250, -1, -1));

        projUpRefreshButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        projUpRefreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        projUpRefreshButton.setText("Refresh");
        projUpRefreshButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projUpRefreshButtonActionPerformed(evt);
            }
        });
        StatusProjectPanel.add(projUpRefreshButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(1010, 250, -1, -1));

        projUpSearchButton.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        projUpSearchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N
        projUpSearchButton.setText("Search");
        projUpSearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projUpSearchButtonActionPerformed(evt);
            }
        });
        StatusProjectPanel.add(projUpSearchButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 40, -1, -1));
        StatusProjectPanel.add(projSearchUptxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 160, -1));

        projNameRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        projNameRadioButton.setText("By Name");
        projNameRadioButton
                .setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        projNameRadioButton.setBorderPainted(true);
        projNameRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projNameRadioButtonActionPerformed(evt);
            }
        });
        StatusProjectPanel.add(projNameRadioButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 80, 90, -1));

        projIDRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        projIDRadioButton.setText("By ID");
        projIDRadioButton
                .setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        projIDRadioButton.setBorderPainted(true);
        projIDRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projIDRadioButtonActionPerformed(evt);
            }
        });
        StatusProjectPanel.add(projIDRadioButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 60, -1));

        projComUptxt.setColumns(10);
        projComUptxt.setRows(2);
        projComUptxt.setTabSize(0);
        jScrollPane15.setViewportView(projComUptxt);

        StatusProjectPanel.add(jScrollPane15, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 210, 140, 70));

        EnterYourSearchLabel9.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        EnterYourSearchLabel9.setText("Enter your search");
        StatusProjectPanel.add(EnterYourSearchLabel9,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1));

        jLabel22.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        jLabel22.setText(" Due Date");
        StatusProjectPanel.add(jLabel22, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 130, -1, -1));

        jLabel23.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        jLabel23.setText("Project Status");
        StatusProjectPanel.add(jLabel23, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 170, -1, -1));

        jLabel24.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        jLabel24.setText("Comments");
        StatusProjectPanel.add(jLabel24, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 210, -1, -1));

        background_green12.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        background_green12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N
        StatusProjectPanel.add(background_green12,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -30, 1250, 460));

        projectsTab.addTab(" Status", StatusProjectPanel);

        SearchProjectPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
        SearchProjectPanel.add(projSearchtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 160, -1));

        projSearchButton.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        projSearchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N
        projSearchButton.setText("Search");
        projSearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projSearchButtonActionPerformed(evt);
            }
        });
        SearchProjectPanel.add(projSearchButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 40, -1, -1));

        projNameRadioButton1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        projNameRadioButton1.setText("By Name");
        projNameRadioButton1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        projNameRadioButton1.setBorderPainted(true);
        projNameRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projNameRadioButton1ActionPerformed(evt);
            }
        });
        SearchProjectPanel.add(projNameRadioButton1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 80, 90, -1));

        projIDRadioButton1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        projIDRadioButton1.setText("By ID");
        projIDRadioButton1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        projIDRadioButton1.setBorderPainted(true);
        projIDRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projIDRadioButton1ActionPerformed(evt);
            }
        });
        SearchProjectPanel.add(projIDRadioButton1,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 60, -1));

        projSearchTable.setModel(new javax.swing.table.DefaultTableModel(
                new Object[][] { { null, null, null, null, null, null }, { null, null, null, null, null, null },
                        { null, null, null, null, null, null }, { null, null, null, null, null, null } },
                new String[] { "Title 1", "Title 2", "Title 3", "Title 4", "Title 5", "Title 6" }));
        jScrollPane16.setViewportView(projSearchTable);

        SearchProjectPanel.add(jScrollPane16, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 20, 800, 220));

        projRefreshSearchButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        projRefreshSearchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        projRefreshSearchButton.setText("Refresh");
        projRefreshSearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projRefreshSearchButtonActionPerformed(evt);
            }
        });
        SearchProjectPanel.add(projRefreshSearchButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(1010, 250, -1, -1));

        EnterYourSearchLabel10.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        EnterYourSearchLabel10.setText("Enter your search");
        SearchProjectPanel.add(EnterYourSearchLabel10,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1));

        background_green13.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        background_green13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N
        SearchProjectPanel.add(background_green13,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -40, 1250, 470));

        projectsTab.addTab("Search", SearchProjectPanel);

        reportsTab.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        reportsTab.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                reportsTabMouseClicked(evt);
            }
        });

        ProjectReportPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        genRepButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        genRepButton.setText("Generate Report");
        genRepButton.setOpaque(true);
        genRepButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                genRepButtonActionPerformed(evt);
            }
        });
        ProjectReportPanel.add(genRepButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 270, -1, 40));

        pBeginDateChooser.setDateFormatString("yyyy-MM-dd");
        ProjectReportPanel.add(pBeginDateChooser,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(440, 120, 130, -1));

        pEndDateChooser.setDateFormatString("yyyy-MM-dd");
        ProjectReportPanel.add(pEndDateChooser,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 170, 130, -1));

        jLabel2.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        jLabel2.setText("This report shows all projects from two chosen dates.");
        ProjectReportPanel.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 70, -1, -1));

        jLabel5.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        jLabel5.setText("You can see the report here ");
        ProjectReportPanel.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 340, -1, -1));

        jLabel6.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        jLabel6.setText("please chose a start date ");
        ProjectReportPanel.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 120, -1, -1));

        jLabel7.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        jLabel7.setText("Chose a due date");
        ProjectReportPanel.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 170, -1, -1));

        Show_report_Button.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        Show_report_Button
                .setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icon-service-contract.png"))); // NOI18N
        Show_report_Button.setText("Show Report");
        Show_report_Button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Show_report_ButtonActionPerformed(evt);
            }
        });
        ProjectReportPanel.add(Show_report_Button,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 330, 190, 40));

        jLabel8.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        jLabel8.setText("Click on ");
        ProjectReportPanel.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 280, -1, -1));

        jLabel10.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        jLabel10.setText("Chose relevant project status");
        ProjectReportPanel.add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 220, -1, -1));

        ProjectReportGroup.add(PendingRadioButton);
        PendingRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        PendingRadioButton.setText("Pending");
        PendingRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        PendingRadioButton.setBorderPainted(true);
        PendingRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                PendingRadioButtonActionPerformed(evt);
            }
        });
        ProjectReportPanel.add(PendingRadioButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 220, 80, -1));

        ProjectReportGroup.add(AllRadioButton);
        AllRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        AllRadioButton.setText("All");
        AllRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        AllRadioButton.setBorderPainted(true);
        AllRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AllRadioButtonActionPerformed(evt);
            }
        });
        ProjectReportPanel.add(AllRadioButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 220, 50, -1));

        ProjectReportGroup.add(ProgressRadioButton);
        ProgressRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        ProgressRadioButton.setText("In Progress");
        ProgressRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        ProgressRadioButton.setBorderPainted(true);
        ProgressRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ProgressRadioButtonActionPerformed(evt);
            }
        });
        ProjectReportPanel.add(ProgressRadioButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 220, 100, -1));

        ProjectReportGroup.add(CompletedRadioButton);
        CompletedRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        CompletedRadioButton.setText("Completed");
        CompletedRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        CompletedRadioButton.setBorderPainted(true);
        CompletedRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CompletedRadioButtonActionPerformed(evt);
            }
        });
        ProjectReportPanel.add(CompletedRadioButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(710, 220, 100, -1));

        background_green15.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        background_green15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N
        ProjectReportPanel.add(background_green15,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1250, 430));

        reportsTab.addTab("Project Report", ProjectReportPanel);

        HistoryPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        repHistoryTable
                .setModel(new javax.swing.table.DefaultTableModel(
                        new Object[][] { { null, null, null, null }, { null, null, null, null },
                                { null, null, null, null }, { null, null, null, null } },
                        new String[] { "Title 1", "Title 2", "Title 3", "Title 4" }));
        repHistoryTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                repHistoryTableMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(repHistoryTable);

        HistoryPanel.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 20, 700, 290));

        repSearchButton.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        repSearchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N
        repSearchButton.setText("Search");
        repSearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                repSearchButtonActionPerformed(evt);
            }
        });
        HistoryPanel.add(repSearchButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 40, -1, -1));

        repDateSearchtxt.setDateFormatString("yyyy-MM-dd");
        HistoryPanel.add(repDateSearchtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 150, -1));

        SearchHistoryGroup.add(searchRepDateRadioButton);
        searchRepDateRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        searchRepDateRadioButton.setText("By Project Date");
        searchRepDateRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        searchRepDateRadioButton.setBorderPainted(true);
        searchRepDateRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchRepDateRadioButtonActionPerformed(evt);
            }
        });
        HistoryPanel.add(searchRepDateRadioButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 90, 130, -1));

        SearchHistoryGroup.add(searchRepIDRadioButton);
        searchRepIDRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        searchRepIDRadioButton.setText("By Report ID");
        searchRepIDRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        searchRepIDRadioButton.setBorderPainted(true);
        searchRepIDRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchRepIDRadioButtonActionPerformed(evt);
            }
        });
        HistoryPanel.add(searchRepIDRadioButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 90, 110, -1));

        SearchHistoryGroup.add(searchRepStatRadioButton);
        searchRepStatRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        searchRepStatRadioButton.setText("By Project Status");
        searchRepStatRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        searchRepStatRadioButton.setBorderPainted(true);
        searchRepStatRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchRepStatRadioButtonActionPerformed(evt);
            }
        });
        HistoryPanel.add(searchRepStatRadioButton,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 90, 140, -1));
        HistoryPanel.add(repIDSearchtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 150, -1));

        showRepSearchButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        showRepSearchButton
                .setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icon-service-contract.png"))); // NOI18N
        showRepSearchButton.setText("Show Report");
        showRepSearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                showRepSearchButtonActionPerformed(evt);
            }
        });
        HistoryPanel.add(showRepSearchButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(810, 320, -1, -1));

        repProjStatchoice.add("All Project Statuses");
        repProjStatchoice.add("Pending Projects");
        repProjStatchoice.add("In Progress Projects");
        repProjStatchoice.add("Completed Projects");
        HistoryPanel.add(repProjStatchoice, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 150, -1));

        EnterYourSearchLabel2.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N
        EnterYourSearchLabel2.setText("Enter your search");
        HistoryPanel.add(EnterYourSearchLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1));

        RefreshButton2.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        RefreshButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N
        RefreshButton2.setText("Refresh");
        RefreshButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                RefreshButton2ActionPerformed(evt);
            }
        });
        HistoryPanel.add(RefreshButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1000, 320, -1, -1));

        background_green16.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N
        background_green16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N
        HistoryPanel.add(background_green16, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1250, 430));

        reportsTab.addTab("History", HistoryPanel);

        javax.swing.GroupLayout jLayeredPane1Layout = new javax.swing.GroupLayout(jLayeredPane1);
        jLayeredPane1.setLayout(jLayeredPane1Layout);
        jLayeredPane1Layout.setHorizontalGroup(jLayeredPane1Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1270, Short.MAX_VALUE)
                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jLayeredPane1Layout.createSequentialGroup().addGap(5, 5, 5)
                                .addComponent(projectsTab, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jLayeredPane1Layout.createSequentialGroup().addContainerGap()
                                .addComponent(suppliersTab, javax.swing.GroupLayout.PREFERRED_SIZE, 1250,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jLayeredPane1Layout.createSequentialGroup().addContainerGap()
                                .addComponent(reportsTab, javax.swing.GroupLayout.PREFERRED_SIZE, 1250,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))));
        jLayeredPane1Layout.setVerticalGroup(jLayeredPane1Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 450, Short.MAX_VALUE)
                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jLayeredPane1Layout.createSequentialGroup().addGap(5, 5, 5)
                                .addComponent(projectsTab, javax.swing.GroupLayout.PREFERRED_SIZE, 430,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jLayeredPane1Layout.createSequentialGroup().addGap(8, 8, 8)
                                .addComponent(suppliersTab, javax.swing.GroupLayout.PREFERRED_SIZE, 430,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jLayeredPane1Layout.createSequentialGroup().addGap(9, 9, 9)
                                .addComponent(reportsTab, javax.swing.GroupLayout.PREFERRED_SIZE, 430,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))));
        jLayeredPane1.setLayer(suppliersTab, javax.swing.JLayeredPane.DEFAULT_LAYER);
        jLayeredPane1.setLayer(projectsTab, javax.swing.JLayeredPane.DEFAULT_LAYER);
        jLayeredPane1.setLayer(reportsTab, javax.swing.JLayeredPane.DEFAULT_LAYER);

        getContentPane().add(jLayeredPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 220, 1250, 440));

        projectsButton
                .setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Projects icon 53 x 50.png"))); // NOI18N
        projectsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                projectsButtonActionPerformed(evt);
            }
        });
        getContentPane().add(projectsButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 110, 65, 60));

        jLabel9.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 160, 180, 40));
        jLabel9.setText(loginGUI.username + " Is Logged in");

        manageUserButtonLabel.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
        manageUserButtonLabel.setText("Manage user");
        manageUserButtonLabel
                .setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        manageUserButtonLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                manageUserButtonLabelMouseReleased(evt);
            }
        });
        getContentPane().add(manageUserButtonLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 110, 80, 20));

        changePasswordLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                changePasswordLabelMouseMoved(evt);
            }
        });
        changePasswordLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                changePasswordLabelMouseClicked(evt);
            }
        });
        getContentPane().add(changePasswordLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(164, 112, 106, 17));

        dropManageUserLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/menu.png"))); // NOI18N
        dropManageUserLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                dropManageUserLabelMouseMoved(evt);
            }
        });
        getContentPane().add(dropManageUserLabel,
                new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 110, 120, 40));

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setIcon(
                new javax.swing.ImageIcon(getClass().getResource("/Images/  ? .png"))); // NOI18N
        jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3));
        jLabel1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                jLabel1MouseMoved(evt);
            }
        });
        getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1280, 680));

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

    private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel3MouseClicked
        this.setState(welcome2.ICONIFIED);
    }//GEN-LAST:event_jLabel3MouseClicked

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

    private void logoutButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logoutButtonActionPerformed
        this.setVisible(false);
        loginGUI lg = new loginGUI(1);
        lg.setVisible(true);
    }//GEN-LAST:event_logoutButtonActionPerformed

    private void suppliersButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_suppliersButtonActionPerformed
        suppliersTab.setVisible(true);
        projectsTab.setVisible(false);
        reportsTab.setVisible(false);
    }//GEN-LAST:event_suppliersButtonActionPerformed

    private void reportsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_reportsButtonActionPerformed
        projectsTab.setVisible(false);
        reportsTab.setVisible(true);
        suppliersTab.setVisible(false);

    }//GEN-LAST:event_reportsButtonActionPerformed

    private void projectsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projectsButtonActionPerformed
        projectsTab.setVisible(true);
        reportsTab.setVisible(false);
        suppliersTab.setVisible(false);
    }//GEN-LAST:event_projectsButtonActionPerformed

    private void projAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projAddButtonActionPerformed
        int f = 0;
        int h = 0;
        try {
            String sql = "Insert into projects (project_id,project_name,start_date,due_date,comments) values(?,?,?,?,?)";

            pst = conn.prepareStatement(sql);
            pst.setString(1, projIDtxt.getText());
            pst.setString(2, projNametxt.getText());
            pst.setDate(3, new java.sql.Date(projStartDate.getDate().getTime()));
            pst.setDate(4, new java.sql.Date(projDueDate.getDate().getTime()));
            pst.setString(6, projDesctxt.getText());

            pst.executeQuery();
            JOptionPane.showMessageDialog(null, "Project Added");

        } catch (Exception e) {

            if (projIDtxt.getText().isEmpty())
                projIDtxt.setBackground(Color.red);
            else
                projIDtxt.setBackground(Color.white);

            if (projNametxt.getText().isEmpty())
                projNametxt.setBackground(Color.red);
            else
                projNametxt.setBackground(Color.white);

            if (projDesctxt.getText().isEmpty())
                projDesctxt.setBackground(Color.red);
            else
                projDesctxt.setBackground(Color.white);

            if (f != 2) {
                JOptionPane.showMessageDialog(null, "The Marked Fields Are Empty\n Please Fill All Fields",
                        "Attention", JOptionPane.ERROR_MESSAGE);
            } else {
                JOptionPane.showMessageDialog(null, e);
            }
        }

        if (f == 0 && h == 0) {
            projIDtxt.setText("");
            projNametxt.setText("");
            projDesctxt.setText("");
            projStartDate.setCalendar(null);
            projDueDate.setCalendar(null);
        }
    }//GEN-LAST:event_projAddButtonActionPerformed

    private void projClearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projClearButtonActionPerformed
        projIDtxt.setText("");
        projNametxt.setText("");
        projDesctxt.setText("");
        projStartDate.setCalendar(null);
        projDueDate.setCalendar(null);
    }//GEN-LAST:event_projClearButtonActionPerformed

    private void projUpTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_projUpTableMouseClicked
        try {
            int raw = projUpTable.getSelectedRow();
            tableClick = (projUpTable.getModel().getValueAt(raw, 0).toString());
            String sql = "select due_date,status,comments from projects where project_id='" + tableClick + "' ";
            pst = conn.prepareStatement(sql);
            rs = pst.executeQuery();
            if (rs.next()) {
                Date add1 = rs.getDate("due_date");
                projUpDueDate.setDate(add1);
                String add2 = rs.getString("status");
                projUpStatusChoice.select(add2);
                String add3 = rs.getString("comments");
                projComUptxt.setText(add3);

            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }//GEN-LAST:event_projUpTableMouseClicked

    private void projUpStatusButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projUpStatusButtonActionPerformed
        try {

            String vs = projUpStatusChoice.getSelectedItem();
            String vq = projComUptxt.getText();
            Date vd = new java.sql.Date(projUpDueDate.getDate().getTime());

            String sql = "update projects set status='" + vs + "',comments='" + vq + "',due_date='" + vd
                    + "' where item_id='" + tableClick + "'";

            pst = conn.prepareStatement(sql);
            pst.execute();
            JOptionPane.showMessageDialog(null, "Item Updated");
            update_Status_ProjTable();
        }

        catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }//GEN-LAST:event_projUpStatusButtonActionPerformed

    private void projUpRefreshButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projUpRefreshButtonActionPerformed
        update_Status_ProjTable();

    }//GEN-LAST:event_projUpRefreshButtonActionPerformed

    private void projUpSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projUpSearchButtonActionPerformed
        if (searchmethod.equals("project_id")) {
            try {
                String sn = projSearchUptxt.getText();
                String sql = "select project_id as 'Project ID',project_name as 'Project Name',start_date as 'Start Date',due_date as 'Due Date',status as 'Status',comments as 'Comments' from projects where project_id='"
                        + sn + "'";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                projUpTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        } else {
            try {
                String sn = projSearchUptxt.getText();
                String sql = "select project_id as 'Project ID',project_name as 'Project Name',start_date as 'Start Date',due_date as 'Due Date',status as 'Status',comments as 'Comments' from projects where project_name='"
                        + sn + "'";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                projUpTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        }
    }//GEN-LAST:event_projUpSearchButtonActionPerformed

    private void projNameRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projNameRadioButtonActionPerformed
        searchmethod = "proj_name";
    }//GEN-LAST:event_projNameRadioButtonActionPerformed

    private void projIDRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projIDRadioButtonActionPerformed
        searchmethod = "proj_id";
    }//GEN-LAST:event_projIDRadioButtonActionPerformed

    private void projSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projSearchButtonActionPerformed
        if (searchmethod.equals("project_id")) {
            try {
                String sn = projSearchtxt.getText();
                String sql = "select project_id as 'Project ID',project_name as 'Project Name',start_date as 'Start Date',due_date as 'Due Date',status as 'Status',comments as 'Comments' from projects where project_id='"
                        + sn + "'";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                projSearchTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        } else {
            try {
                String sn = projSearchtxt.getText();
                String sql = "select project_id as 'Project ID',project_name as 'Project Name',start_date as 'Start Date',due_date as 'Due Date',status as 'Status',comments as 'Comments' from projects where project_name='"
                        + sn + "'";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                projSearchTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        }
    }//GEN-LAST:event_projSearchButtonActionPerformed

    private void projNameRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projNameRadioButton1ActionPerformed
        searchmethod = "proj_name";
    }//GEN-LAST:event_projNameRadioButton1ActionPerformed

    private void projIDRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projIDRadioButton1ActionPerformed
        searchmethod = "proj_id";
    }//GEN-LAST:event_projIDRadioButton1ActionPerformed

    private void projRefreshSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projRefreshSearchButtonActionPerformed
        update_Search_ProjTable();
    }//GEN-LAST:event_projRefreshSearchButtonActionPerformed

    private void projectsTabMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_projectsTabMouseClicked
        update_Status_ProjTable();
        update_Search_ProjTable();
    }//GEN-LAST:event_projectsTabMouseClicked

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

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

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

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

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

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

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

    private void SupplierUploadContractButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierUploadContractButtonActionPerformed

        try {

            JFileChooser supplier_chooser = new JFileChooser();
            supplier_chooser.setDialogTitle("Open a File");
            FileNameExtensionFilter docFilter = new FileNameExtensionFilter("Word Files", "docx");
            FileNameExtensionFilter pdfFilter = new FileNameExtensionFilter("PDF Documents", "pdf");
            supplier_chooser.addChoosableFileFilter(docFilter);
            supplier_chooser.addChoosableFileFilter(pdfFilter);
            int result = supplier_chooser.showOpenDialog(null);
            if (result == 0) {
                File f = supplier_chooser.getSelectedFile();
                filename_supplier = f.getAbsolutePath();
                SupplierUploadText.setText(filename_supplier);
                f.getAbsoluteFile();

            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);

        }
    }//GEN-LAST:event_SupplierUploadContractButtonActionPerformed

    private void SupplierShowContractButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierShowContractButtonActionPerformed
        try {

            Desktop.getDesktop().open(new File(filename_supplier));
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }//GEN-LAST:event_SupplierShowContractButtonActionPerformed

    private void SupplierAddButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierAddButtonActionPerformed
        int f = 0;
        int h = 0;
        sn = SupplierContracdIDText.getText();
        int ans;
        try {
            String sql = "Insert into suppliers (supplier_id,supplier_name,supplier_address,supplier_phone,supplier_email,supplier_contract_id) values(?,?,?,?,?,?)";

            pst = conn.prepareStatement(sql);
            pst.setString(1, SupplierIDText.getText());
            pst.setString(2, SupplierNameText.getText());
            pst.setString(3, SupplierAddressText.getText());
            pst.setString(4, SupplierPhoneText.getText());
            pst.setString(5, SupplierEmailText.getText());
            pst.setString(6, SupplierContracdIDText.getText());

            if (SupplierUploadText.getText().isEmpty()) {
                ans = JOptionPane.showConfirmDialog(null,
                        "Are You Sure You Want To Add a Supplier Without a Contract?", "Warning!",
                        JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
                if (ans == 0)
                    pst.execute();
                if (ans == 1) {
                }
            }

            else {

                Path dest = Paths.get("src/SupplierContracts/" + sn + ".pdf");
                Path source = Paths.get(filename_supplier);
                Files.copy(source, dest, StandardCopyOption.REPLACE_EXISTING);
                pst.execute();
            }

            JOptionPane.showMessageDialog(null, "Supplier Has Been Added");
        } catch (Exception e) {
            h = 1;

            if (SupplierIDText.getText().isEmpty())
                SupplierIDText.setBackground(Color.red);
            else
                SupplierIDText.setBackground(Color.white);

            if (SupplierNameText.getText().isEmpty())
                SupplierNameText.setBackground(Color.red);
            else
                SupplierNameText.setBackground(Color.white);

            if (SupplierAddressText.getText().isEmpty())
                SupplierAddressText.setBackground(Color.red);
            else
                SupplierAddressText.setBackground(Color.white);

            if (SupplierPhoneText.getText().isEmpty())
                SupplierPhoneText.setBackground(Color.red);
            else
                SupplierPhoneText.setBackground(Color.white);

            if (SupplierEmailText.getText().isEmpty())
                SupplierEmailText.setBackground(Color.red);
            else
                SupplierEmailText.setBackground(Color.white);

            if (SupplierContracdIDText.getText().isEmpty())
                SupplierContracdIDText.setBackground(Color.red);
            else
                SupplierContracdIDText.setBackground(Color.white);

            if (f != 2) {
                JOptionPane.showMessageDialog(null, "The Marked Fields Are Empty\n Please Fill All Fields",
                        "Attention!", JOptionPane.ERROR_MESSAGE);
            } else {
                JOptionPane.showMessageDialog(null, e);
            }
        }
        if (f == 0 && h == 0) {
            SupplierIDText.setText("");
            SupplierNameText.setText("");
            SupplierAddressText.setText("");
            SupplierPhoneText.setText("");
            SupplierEmailText.setText("");
            SupplierContracdIDText.setText("");
            SupplierUploadText.setText("");
        }
    }//GEN-LAST:event_SupplierAddButtonActionPerformed

    private void ClearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ClearButtonActionPerformed

        SupplierIDText.setText("");
        SupplierNameText.setText("");
        SupplierAddressText.setText("");
        SupplierPhoneText.setText("");
        SupplierEmailText.setText("");
        SupplierContracdIDText.setText("");
        SupplierUploadText.setText("");
    }//GEN-LAST:event_ClearButtonActionPerformed

    private void SupplierIdRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierIdRadioButtonActionPerformed
        searchmethod = "supplier_id";
    }//GEN-LAST:event_SupplierIdRadioButtonActionPerformed

    private void SupplierNameRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierNameRadioButtonActionPerformed
        searchmethod = "supplier_name";
    }//GEN-LAST:event_SupplierNameRadioButtonActionPerformed

    private void SupplierSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierSearchButtonActionPerformed
        if (searchmethod.equals("supplier_id")) {
            try {
                String ss = SupplierSearchText1.getText();
                String sql = "select supplier_id as 'Supplier ID',supplier_name as Supplier Name',supplier_address as 'Address',supplier_phone as 'Phone No' ,supplier_email as 'Email',supplier_contract_id as 'Contract No' from suppliers where supplier_id='"
                        + ss + "' ";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                SuppliersTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        } else {
            try {
                String ss = SupplierSearchText1.getText();
                String sql = "select supplier_id as 'Supplier ID',supplier_name as Supplier Name',supplier_address as 'Address',supplier_phone as 'Phone No' ,supplier_email as 'Email',supplier_contract_id as 'Contract No' from suppliers where supplier_name='"
                        + ss + "' ";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                SuppliersTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        }
    }//GEN-LAST:event_SupplierSearchButtonActionPerformed

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

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

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

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

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

        try {
            int raw = SuppliersTable.getSelectedRow();
            tableClick = (SuppliersTable.getModel().getValueAt(raw, 0).toString());
            String sql = "select supplier_id, supplier_name, supplier_address,supplier_phone, supplier_email, supplier_contract_id from suppliers where supplier_id='"
                    + tableClick + "' ";
            pst = conn.prepareStatement(sql);
            rs = pst.executeQuery();
            if (rs.next()) {
                String add1 = rs.getString("supplier_name");
                SupplierNameText1.setText(add1);
                String add2 = rs.getString("supplier_address");
                SupplierAddressText1.setText(add2);
                String add3 = rs.getString("supplier_phone");
                SupplierPhoneText1.setText(add3);
                String add4 = rs.getString("supplier_email");
                SupplierEmailText1.setText(add4);
                String add5 = rs.getString("supplier_contract_id");
                SupplierContractIDText1.setText(add5);

            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);

        }
    }//GEN-LAST:event_SuppliersTableMouseClicked

    private void SupplierUpdateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierUpdateButtonActionPerformed

        fn = SupplierContractIDText1.getText();

        try {

            String sn = SupplierNameText1.getText();
            String sa = SupplierAddressText1.getText();
            String sp = SupplierPhoneText1.getText();
            String se = SupplierEmailText1.getText();
            String sc = SupplierContractIDText1.getText();

            String sql = "update suppliers set supplier_name='" + sn + "',supplier_address='" + sa
                    + "',supplier_phone='" + sp + "',supplier_email='" + se + "',supplier_contract_id='" + sc
                    + "' where supplier_id='" + tableClick + "'";
            pst = conn.prepareStatement(sql);
            pst.execute();
            JOptionPane.showMessageDialog(null, "Supplier Details Updated");
            update_Supplier_table();
        }

        catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }

        try {

            if (!SupplierUploadText1.getText().isEmpty()) {
                Path dest = Paths
                        .get("C:/Users/Felix/Documents/NetBeansProjects/Yatzig/src/Contracts/" + fn + ".pdf");
                Path source = Paths.get(supplier_filename_update);
                Files.copy(source, dest, StandardCopyOption.REPLACE_EXISTING);

                SupplierNameText1.setText(" ");
                SupplierAddressText1.setText(" ");
                SupplierPhoneText1.setText(" ");
                SupplierEmailText1.setText(" ");
                SupplierContractIDText1.setText(" ");
                SupplierUploadText1.setText(" ");

            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }//GEN-LAST:event_SupplierUpdateButtonActionPerformed

    private void SupplierDeleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierDeleteButtonActionPerformed

        int ans = JOptionPane.showConfirmDialog(null,
                "Are You Sure You Want To Delete " + SupplierNameText1.getText() + " From The List ?", "Attention",
                JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
        if (ans == 0) {
            int raw = SuppliersTable.getSelectedRow();
            tableClick = (SuppliersTable.getModel().getValueAt(raw, 0).toString());
            String sql = "delete from suppliers where supplier_id='" + tableClick + "'";
            try {
                pst = conn.prepareStatement(sql);
                pst.execute();
                JOptionPane.showMessageDialog(null, "Supplier Deleted!");
                update_Supplier_table();
            } catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }

        }
        if (ans == 1) {
        }
    }//GEN-LAST:event_SupplierDeleteButtonActionPerformed

    private void SupplierRefreshButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierRefreshButtonActionPerformed
        update_Supplier_table();
    }//GEN-LAST:event_SupplierRefreshButtonActionPerformed

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

    private void SupplierUploadContractButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierUploadContractButton1ActionPerformed
        try {

            JFileChooser supplier_chooser = new JFileChooser();
            supplier_chooser.setDialogTitle("Open a File");
            FileNameExtensionFilter docFilter = new FileNameExtensionFilter("Word Files", "docx");
            FileNameExtensionFilter pdfFilter = new FileNameExtensionFilter("PDF Documents", "pdf");
            supplier_chooser.addChoosableFileFilter(docFilter);
            supplier_chooser.addChoosableFileFilter(pdfFilter);
            int result = supplier_chooser.showOpenDialog(null);
            if (result == 0) {
                File f = supplier_chooser.getSelectedFile();
                supplier_filename_update = f.getAbsolutePath();
                SupplierUploadText1.setText(supplier_filename_update);
                f.getAbsoluteFile();

            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);

        }
    }//GEN-LAST:event_SupplierUploadContractButton1ActionPerformed

    private void SupplierShowButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierShowButtonActionPerformed
        try {

            Desktop.getDesktop().open(new File(supplier_filename_update));
        }

        catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }//GEN-LAST:event_SupplierShowButtonActionPerformed

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

    private void SuppliersSearchTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SuppliersSearchTableMouseClicked
        try {
            int raw = SuppliersSearchTable.getSelectedRow();
            tableClick = (SuppliersSearchTable.getModel().getValueAt(raw, 0).toString());
            String sql = "select supplier_id, supplier_name, supplier_address,supplier_phone, supplier_email, supplier_contract_id from suppliers where supplier_id='"
                    + tableClick + "' ";
            pst = conn.prepareStatement(sql);
            rs = pst.executeQuery();
            if (rs.next()) {
                String add1 = rs.getString("supplier_id");
                SupplierContractIDText2.setText(add1);

            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }//GEN-LAST:event_SuppliersSearchTableMouseClicked

    private void SupplierRefreshButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierRefreshButton1ActionPerformed
        update_Supplier_Search_table();
    }//GEN-LAST:event_SupplierRefreshButton1ActionPerformed

    private void SupplierIdRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierIdRadioButton1ActionPerformed
        searchmethod = "supplier_id";
    }//GEN-LAST:event_SupplierIdRadioButton1ActionPerformed

    private void SupplierNameRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierNameRadioButton1ActionPerformed
        searchmethod = "supplier_name";
    }//GEN-LAST:event_SupplierNameRadioButton1ActionPerformed

    private void SupplierSearchButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SupplierSearchButton1ActionPerformed

        if (searchmethod.equals("supplier_id")) {
            try {
                String ss = SupplierSearchText2.getText();
                String sql = "select supplier_id as 'Supplier ID',supplier_name as Supplier Name',supplier_address as 'Address',supplier_phone as 'Phone No' ,supplier_email as 'Email',supplier_contract_id as 'Contract No' from suppliers where supplier_id='"
                        + ss + "' ";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                SuppliersSearchTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        } else {
            try {
                String ss = SupplierSearchText2.getText();
                String sql = "select supplier_id as 'Supplier ID',supplier_name as Supplier Name',supplier_address as 'Address',supplier_phone as 'Phone No' ,supplier_email as 'Email',supplier_contract_id as 'Contract No' from suppliers where supplier_name='"
                        + ss + "' ";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                SuppliersSearchTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        }
    }//GEN-LAST:event_SupplierSearchButton1ActionPerformed

    private void Supplier_Show_Contract_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Supplier_Show_Contract_ButtonActionPerformed
        try {
            int raw = SuppliersSearchTable.getSelectedRow();
            tableClick = (SuppliersSearchTable.getModel().getValueAt(raw, 0).toString());
            String sql = "select supplier_id, supplier_name, supplier_address,supplier_phone, supplier_email, supplier_contract_id from suppliers where supplier_id='"
                    + tableClick + "' ";
            pst = conn.prepareStatement(sql);
            rs = pst.executeQuery();
            if (rs.next()) {
                String add1 = rs.getString("supplier_id");

                String supplier2_filename_show_contract = "src/SupplierContracts/" + add1 + ".pdf";
                Desktop.getDesktop().open(new File(supplier2_filename_show_contract));
            }
        }

        catch (Exception e) {
            JOptionPane.showMessageDialog(null, "This Supplier Does Not Have a Contract", "Attention",
                    JOptionPane.WARNING_MESSAGE);
        }
    }//GEN-LAST:event_Supplier_Show_Contract_ButtonActionPerformed

    private void suppliersTabMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_suppliersTabMouseClicked
        update_Supplier_table();
        update_Supplier_Search_table();
    }//GEN-LAST:event_suppliersTabMouseClicked

    private void manageUserButtonLabelMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_manageUserButtonLabelMouseReleased
        if (openClose == false) {
            dropManageUserLabel.setVisible(true);
            changePasswordLabel.setVisible(true);
            openClose = true;
        } else {
            dropManageUserLabel.setVisible(false);
            changePasswordLabel.setVisible(false);
            openClose = false;
        }
    }//GEN-LAST:event_manageUserButtonLabelMouseReleased

    private void dropManageUserLabelMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_dropManageUserLabelMouseMoved
        changePasswordLabel.setBorder(null);
    }//GEN-LAST:event_dropManageUserLabelMouseMoved

    private void changePasswordLabelMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_changePasswordLabelMouseMoved
        changePasswordLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
    }//GEN-LAST:event_changePasswordLabelMouseMoved

    private void changePasswordLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_changePasswordLabelMouseClicked
        changePassword cp = new changePassword();
        cp.pack();
        cp.setLocationRelativeTo(null);
        cp.setVisible(true);
    }//GEN-LAST:event_changePasswordLabelMouseClicked

    private void jLabel1MouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1MouseMoved
        changePasswordLabel.setBorder(null);
        jLabel3.setBorder(null);
    }//GEN-LAST:event_jLabel1MouseMoved

    private void jLabel3MouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel3MouseMoved
        jLabel3.setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY, 1));
    }//GEN-LAST:event_jLabel3MouseMoved

    private void genRepButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_genRepButtonActionPerformed
        Document doc = new Document();
        PdfWriter docWriter = null;
        int repID = ThreadLocalRandom.current().nextInt(10000, 99999 + 1);
        DecimalFormat df = new DecimalFormat("0.00");
        //Date d = Calendar.getInstance().getTime();
        DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy");
        Date date = new Date();

        try {

            //special font sizes
            Font bfBold12 = new Font(FontFamily.TIMES_ROMAN, 12, Font.BOLD, new BaseColor(0, 0, 0));
            Font bf12 = new Font(FontFamily.TIMES_ROMAN, 12);

            //file path
            String dt = dateFormat.format(date);
            sFileName = "Report No- " + repID + " Project Report- " + dt + " Status " + report_status + " .pdf";
            String path = "src/ProjectReports/" + sFileName;
            docWriter = PdfWriter.getInstance(doc, new FileOutputStream(path));

            DateFormat dateFormat3 = new SimpleDateFormat("dd/MM/yyyy HH:mm");
            String d = dateFormat3.format(Calendar.getInstance().getTime());

            //document header attributes
            doc.addCreationDate();
            doc.setPageSize(PageSize.LETTER);

            //open document
            doc.open();

            //create a paragraph
            DateFormat dateFormat2 = new SimpleDateFormat("dd/MM/yyyy");
            String sd2 = dateFormat2.format(pBeginDateChooser.getDate());
            String ed2 = dateFormat2.format(pEndDateChooser.getDate());
            Image image = Image.getInstance("src/Images/logo for pdf.png");
            Font font1 = new Font(Font.FontFamily.HELVETICA, 25, Font.BOLD);
            Paragraph paragraph = new Paragraph();
            Paragraph paragraph2 = new Paragraph("This report was generated by " + loginGUI.username + " at " + d
                    + "\nYou can see all projects from " + sd2 + " to " + ed2);
            image.setAlignment(Image.RIGHT);
            doc.add(image);

            //specify column widths
            float[] columnWidths = { 2f, 2f, 2f, 2f, 2f };
            //create PDF table with the given widths
            PdfPTable table = new PdfPTable(columnWidths);
            // set table width a percentage of the page width
            table.setWidthPercentage(100f);

            //insert column headings
            insertCell(table, "Project ID", Element.ALIGN_CENTER, 1, bfBold12);
            insertCell(table, "Project Name", Element.ALIGN_CENTER, 1, bfBold12);
            insertCell(table, "Start Date", Element.ALIGN_CENTER, 1, bfBold12);
            insertCell(table, "Due Date", Element.ALIGN_CENTER, 1, bfBold12);
            insertCell(table, "Status", Element.ALIGN_CENTER, 1, bfBold12);
            table.setHeaderRows(1);

            //insert an empty row
            /* insertCell(table, "", Element.ALIGN_LEFT, 4, bfBold12);*/
            //create section heading by cell merging
            /* insertCell(table, "New York Orders ...", Element.ALIGN_LEFT, 4, bfBold12);*/
            /*double orderTotal, total = 0;*/

            String add1, add2, add3, add4, add5;
            DateFormat dateFormat1 = new SimpleDateFormat("yyyy-MM-dd");
            String sd = dateFormat1.format(pBeginDateChooser.getDate());
            String ed = dateFormat1.format(pEndDateChooser.getDate());

            if (report_status.equals("All")) {
                try {

                    String sql = "select project_id,project_name,start_date,due_date,status from projects where due_date >= '"
                            + sd + "' and due_date <= '" + ed + "' and start_date >= '" + sd
                            + "'and start_date <= '" + ed + "'";
                    pst = conn.prepareStatement(sql);
                    rs = pst.executeQuery();
                    while (rs.next()) {
                        add1 = rs.getString("project_id");
                        add2 = rs.getString("project_name");
                        add3 = dateFormat.format(rs.getDate("start_date"));
                        add4 = dateFormat.format(rs.getDate("due_date"));
                        add5 = rs.getString("status");
                        insertCell(table, add1, Element.ALIGN_CENTER, 1, bf12);
                        insertCell(table, add2, Element.ALIGN_CENTER, 1, bf12);
                        insertCell(table, add3, Element.ALIGN_CENTER, 1, bf12);
                        insertCell(table, add4, Element.ALIGN_CENTER, 1, bf12);
                        insertCell(table, add5, Element.ALIGN_CENTER, 1, bf12);

                    }
                } catch (Exception e) {
                    JOptionPane.showMessageDialog(null, e);

                }
            } else {
                try {

                    String sql = "select project_id,project_name,start_date,due_date,status from projects where status = '"
                            + report_status + "' and due_date >= '" + sd + "' and due_date <= '" + ed
                            + "' and start_date >= '" + sd + "'and start_date <= '" + ed + "'";
                    pst = conn.prepareStatement(sql);
                    rs = pst.executeQuery();
                    while (rs.next()) {
                        add1 = rs.getString("project_id");
                        add2 = rs.getString("project_name");
                        add3 = dateFormat.format(rs.getDate("start_date"));
                        add4 = dateFormat.format(rs.getDate("due_date"));
                        add5 = rs.getString("status");
                        insertCell(table, add1, Element.ALIGN_CENTER, 1, bf12);
                        insertCell(table, add2, Element.ALIGN_CENTER, 1, bf12);
                        insertCell(table, add3, Element.ALIGN_CENTER, 1, bf12);
                        insertCell(table, add4, Element.ALIGN_CENTER, 1, bf12);
                        insertCell(table, add5, Element.ALIGN_CENTER, 1, bf12);

                    }
                } catch (Exception e) {
                    JOptionPane.showMessageDialog(null, e);

                }
            }

            //add the PDF table to the paragraph
            paragraph2.add(table);

            // add the paragraph to the document
            doc.add(new Paragraph("\nProject Status Report " + dt + "\n", font1));
            doc.add(paragraph2);
        } catch (DocumentException dex) {
            dex.printStackTrace();
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            if (doc != null) {
                //close the document
                doc.close();
                JOptionPane.showMessageDialog(null, "Report No " + repID + " Generated!");
            }
            if (docWriter != null) {
                //close the writer
                docWriter.close();
            }
        }
        saveToDB(report_status, date, repID);
    }//GEN-LAST:event_genRepButtonActionPerformed

    private void Show_report_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Show_report_ButtonActionPerformed

        String filename_show_report = "src/ProjectReports/" + sFileName;
        try {

            Desktop.getDesktop().open(new File(filename_show_report));
        }

        catch (Exception e) {
            JOptionPane.showMessageDialog(null, "The Report Generetad Wasn't Found", "Error",
                    JOptionPane.ERROR_MESSAGE);
        }
    }//GEN-LAST:event_Show_report_ButtonActionPerformed

    private void PendingRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_PendingRadioButtonActionPerformed
        report_status = "Pending";
    }//GEN-LAST:event_PendingRadioButtonActionPerformed

    private void AllRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AllRadioButtonActionPerformed
        report_status = "All";
    }//GEN-LAST:event_AllRadioButtonActionPerformed

    private void ProgressRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ProgressRadioButtonActionPerformed
        report_status = "In Progress";
    }//GEN-LAST:event_ProgressRadioButtonActionPerformed

    private void CompletedRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CompletedRadioButtonActionPerformed
        report_status = "Completed";
    }//GEN-LAST:event_CompletedRadioButtonActionPerformed

    private void repHistoryTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_repHistoryTableMouseClicked
        try {
            int raw = repHistoryTable.getSelectedRow();
            tableClick = (repHistoryTable.getModel().getValueAt(raw, 0).toString());
            String sql = "select fileName from reports where report_no='" + tableClick + "' ";
            pst = conn.prepareStatement(sql);
            rs = pst.executeQuery();
            if (rs.next())
                sFileName = rs.getString("fileName");
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }//GEN-LAST:event_repHistoryTableMouseClicked

    private void repSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_repSearchButtonActionPerformed
        if (searchmethod.equals("ID")) {
            try {
                String sn = repIDSearchtxt.getText();
                String sql = "select report_no,report_create_date,repProj_start_date,repProj_due_date,repStatus from reports where report_no='"
                        + sn + "' and reportCategory = 'Projects' ";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                repHistoryTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        } else if (searchmethod.equals("Stat")) {
            try {
                String sn = repProjStatchoice.getSelectedItem();
                String sql = "select report_no,report_create_date,repProj_start_date,repProj_due_date,repStatus from reports where repStatus='"
                        + sn + "' and reportCategory = 'Projects' ";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                repHistoryTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        } else if (searchmethod.equals("Date")) {
            DateFormat dateFormat1 = new SimpleDateFormat("yyyy-MM-dd");
            String sd = dateFormat1.format(repDateSearchtxt.getDate());
            try {
                String sql = "select report_no,report_create_date,repProj_start_date,repProj_due_date,repStatus from reports where repProj_start_date<='"
                        + sd + "' and repProj_due_date>='" + sd
                        + "' and reportCategory = 'Projects' order by report_create_date";
                pst = conn.prepareStatement(sql);
                rs = pst.executeQuery(sql);
                repHistoryTable.setModel(DbUtils.resultSetToTableModel(rs));
            }

            catch (Exception e) {
                JOptionPane.showMessageDialog(null, e);
            }
        }
    }//GEN-LAST:event_repSearchButtonActionPerformed

    private void searchRepDateRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchRepDateRadioButtonActionPerformed
        searchmethod = "Date";
        repIDSearchtxt.setVisible(false);
        repIDSearchtxt.setEnabled(false);
        repDateSearchtxt.setVisible(true);
        repDateSearchtxt.setEnabled(true);
        repProjStatchoice.setVisible(false);
        repProjStatchoice.setEnabled(false);
        this.validate();
    }//GEN-LAST:event_searchRepDateRadioButtonActionPerformed

    private void searchRepIDRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchRepIDRadioButtonActionPerformed
        searchmethod = "ID";
        repDateSearchtxt.setVisible(false);
        repDateSearchtxt.setEnabled(false);
        repIDSearchtxt.setVisible(true);
        repIDSearchtxt.setEnabled(true);
        repProjStatchoice.setVisible(false);
        repProjStatchoice.setEnabled(false);
        this.validate();
    }//GEN-LAST:event_searchRepIDRadioButtonActionPerformed

    private void searchRepStatRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchRepStatRadioButtonActionPerformed
        searchmethod = "Stat";
        repIDSearchtxt.setVisible(false);
        repIDSearchtxt.setEnabled(false);
        repDateSearchtxt.setVisible(false);
        repDateSearchtxt.setEnabled(false);
        repProjStatchoice.setVisible(true);
        repProjStatchoice.setEnabled(true);
        this.validate();
    }//GEN-LAST:event_searchRepStatRadioButtonActionPerformed

    private void showRepSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showRepSearchButtonActionPerformed
        String fn = "src/ProjectReports/" + sFileName;
        try {

            Desktop.getDesktop().open(new File(fn));
        }

        catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }//GEN-LAST:event_showRepSearchButtonActionPerformed

    private void RefreshButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RefreshButton2ActionPerformed
        rep_Search_Table();
    }//GEN-LAST:event_RefreshButton2ActionPerformed

    private void reportsTabMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportsTabMouseClicked
        rep_Search_Table();
    }//GEN-LAST:event_reportsTabMouseClicked

    /**
     * @param args the command line arguments
     */
    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 ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(welcome2.class.getName()).log(java.util.logging.Level.SEVERE, null,
                    ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(welcome2.class.getName()).log(java.util.logging.Level.SEVERE, null,
                    ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(welcome2.class.getName()).log(java.util.logging.Level.SEVERE, null,
                    ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(welcome2.class.getName()).log(java.util.logging.Level.SEVERE, null,
                    ex);
        }
        //</editor-fold>
        //</editor-fold>

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

    /**
    * Retrieves the information from the DB and Display it in the jTable component 
    */
    private void update_Status_ProjTable() {
        try {
            String sql = "select project_id as 'Project ID',project_name as 'Project Name',start_date as 'Start Date',due_date as 'Due Date',status as 'Status',comments as 'Comments' from projects";
            pst = conn.prepareStatement(sql);
            rs = pst.executeQuery(sql);
            projUpTable.setModel(DbUtils.resultSetToTableModel(rs));
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }

    }

    private void update_Search_ProjTable() {
        try {
            String sql = "select project_id as 'Project ID',project_name as 'Project Name',start_date as 'Start Date',due_date as 'Due Date',status as 'Status',comments as 'Comments' from projects";
            pst = conn.prepareStatement(sql);
            rs = pst.executeQuery(sql);
            projSearchTable.setModel(DbUtils.resultSetToTableModel(rs));
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }

    }

    private void update_Supplier_table() {
        try {
            String sql = "select supplier_id as 'Supplier ID',supplier_name as 'Supplier Name', supplier_address as 'Address',supplier_phone as 'Phone', supplier_email as 'Email', supplier_contract_id as 'Contract ID' from suppliers";
            pst = conn.prepareStatement(sql);
            rs = pst.executeQuery(sql);
            SuppliersTable.setModel(DbUtils.resultSetToTableModel(rs));
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }

    }

    private void update_Supplier_Search_table() {
        try {
            String sql = "select supplier_id as 'Supplier ID',supplier_name as 'Supplier Name', supplier_address as 'Address',supplier_phone as 'Phone', supplier_email as 'Email', supplier_contract_id as 'Contract ID' from suppliers";
            pst = conn.prepareStatement(sql);
            rs = pst.executeQuery(sql);
            SuppliersSearchTable.setModel(DbUtils.resultSetToTableModel(rs));
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }

    }

    private void saveToDB(String s, Date date, int pi) {
        try {
            String sql = "Insert into reports (report_no,report_create_date,repProj_start_date,repProj_due_date,repStatus,fileName,reportCategory) values(?,?,?,?,?,?,?)";

            pst = conn.prepareStatement(sql);
            pst.setInt(1, pi);
            pst.setDate(2, new java.sql.Date(date.getTime()));
            pst.setDate(3, new java.sql.Date(pBeginDateChooser.getDate().getTime()));
            pst.setDate(4, new java.sql.Date(pEndDateChooser.getDate().getTime()));
            pst.setString(5, s);
            pst.setString(6, sFileName);
            pst.setString(7, "Projects");
            pst.execute();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }

    private void insertCell(PdfPTable table, String text, int align, int colspan, Font font) {

        //create a new cell with the specified Text and Font
        PdfPCell cell = new PdfPCell(new Phrase(text.trim(), font));
        //set the cell alignment
        cell.setHorizontalAlignment(align);
        //set the cell column span in case you want to merge two or more cells
        cell.setColspan(colspan);
        //in case there is no text and you wan to create an empty row
        if (text.trim().equalsIgnoreCase("")) {
            cell.setMinimumHeight(10f);
        }
        //add the call to the table
        table.addCell(cell);

    }

    private void rep_Search_Table() {
        try {
            String sql = "select report_no as 'Report ID',report_create_date as 'Creation Date',repProj_start_date as 'Project Start Date',repProj_due_date as 'Project Due Date',repStatus as 'Project Status' from reports where reportCategory='Projects' ORDER by report_create_date";
            pst = conn.prepareStatement(sql);
            rs = pst.executeQuery(sql);
            repHistoryTable.setModel(DbUtils.resultSetToTableModel(rs));
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e);
        }
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel AddProjectPanel;
    private javax.swing.JPanel AddSupplierPanel;
    private javax.swing.JRadioButton AllRadioButton;
    private javax.swing.JButton ClearButton;
    private javax.swing.JRadioButton CompletedRadioButton;
    private javax.swing.JPanel ContractPanel;
    private javax.swing.JLabel EnterYourSearchLabel10;
    private javax.swing.JLabel EnterYourSearchLabel2;
    private javax.swing.JLabel EnterYourSearchLabel6;
    private javax.swing.JLabel EnterYourSearchLabel7;
    private javax.swing.JLabel EnterYourSearchLabel9;
    private javax.swing.JPanel HistoryPanel;
    private javax.swing.JRadioButton PendingRadioButton;
    private javax.swing.JRadioButton ProgressRadioButton;
    private javax.swing.JLabel ProjectCommentsLabel;
    private javax.swing.JLabel ProjectDuedateLabel;
    private javax.swing.JLabel ProjectIDLabel;
    private javax.swing.JLabel ProjectNameLabel;
    private javax.swing.ButtonGroup ProjectReportGroup;
    private javax.swing.JPanel ProjectReportPanel;
    private javax.swing.JLabel ProjectStartdateLabel;
    private javax.swing.JButton RefreshButton2;
    private javax.swing.ButtonGroup SearchHistoryGroup;
    private javax.swing.JPanel SearchProjectPanel;
    private javax.swing.JPanel SearchSupplierPanel;
    private javax.swing.JButton Show_report_Button;
    private javax.swing.JPanel StatusProjectPanel;
    private javax.swing.JButton SupplierAddButton;
    private javax.swing.JLabel SupplierAddressLabel;
    private javax.swing.JLabel SupplierAddressLabel1;
    private javax.swing.JTextField SupplierAddressText;
    private javax.swing.JTextField SupplierAddressText1;
    private javax.swing.JTextField SupplierContracdIDText;
    private javax.swing.JLabel SupplierContractIDLabel;
    private javax.swing.JLabel SupplierContractIDLabel1;
    private javax.swing.JTextField SupplierContractIDText1;
    private javax.swing.JTextField SupplierContractIDText2;
    private javax.swing.JPanel SupplierContractPanel;
    private javax.swing.JButton SupplierDeleteButton;
    private javax.swing.JLabel SupplierEmailLabel;
    private javax.swing.JLabel SupplierEmailLabel1;
    private javax.swing.JTextField SupplierEmailText;
    private javax.swing.JTextField SupplierEmailText1;
    private javax.swing.JLabel SupplierIDLabel;
    private javax.swing.JTextField SupplierIDText;
    private javax.swing.JRadioButton SupplierIdRadioButton;
    private javax.swing.JRadioButton SupplierIdRadioButton1;
    private javax.swing.JLabel SupplierNameLabel;
    private javax.swing.JLabel SupplierNameLabel1;
    private javax.swing.JRadioButton SupplierNameRadioButton;
    private javax.swing.JRadioButton SupplierNameRadioButton1;
    private javax.swing.JTextField SupplierNameText;
    private javax.swing.JTextField SupplierNameText1;
    private javax.swing.JLabel SupplierPhoneLabel;
    private javax.swing.JLabel SupplierPhoneLabel1;
    private javax.swing.JTextField SupplierPhoneText;
    private javax.swing.JTextField SupplierPhoneText1;
    private javax.swing.JButton SupplierRefreshButton;
    private javax.swing.JButton SupplierRefreshButton1;
    private javax.swing.JButton SupplierSearchButton;
    private javax.swing.JButton SupplierSearchButton1;
    private javax.swing.JTextField SupplierSearchText1;
    private javax.swing.JTextField SupplierSearchText2;
    private javax.swing.JButton SupplierShowButton;
    private javax.swing.JButton SupplierShowContractButton;
    private javax.swing.JButton SupplierUpdateButton;
    private javax.swing.JButton SupplierUploadContractButton;
    private javax.swing.JButton SupplierUploadContractButton1;
    private javax.swing.JTextField SupplierUploadText;
    private javax.swing.JTextField SupplierUploadText1;
    private javax.swing.JButton Supplier_Show_Contract_Button;
    private javax.swing.JLabel SupplierlContractLabel;
    private javax.swing.JTable SuppliersSearchTable;
    private javax.swing.JTable SuppliersTable;
    private javax.swing.JPanel UpdateSupplierPanel;
    private javax.swing.JLabel background_green1;
    private javax.swing.JLabel background_green11;
    private javax.swing.JLabel background_green12;
    private javax.swing.JLabel background_green13;
    private javax.swing.JLabel background_green15;
    private javax.swing.JLabel background_green16;
    private javax.swing.JLabel background_green2;
    private javax.swing.JLabel background_green3;
    private javax.swing.JLabel changePasswordLabel;
    private javax.swing.JLabel contract_Label1;
    private javax.swing.JLabel dropManageUserLabel;
    private javax.swing.JToggleButton genRepButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel42;
    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.JLayeredPane jLayeredPane1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JScrollPane jScrollPane17;
    private javax.swing.JScrollPane jScrollPane18;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JButton logoutButton;
    private javax.swing.JLabel manageUserButtonLabel;
    private com.toedter.calendar.JDateChooser pBeginDateChooser;
    private com.toedter.calendar.JDateChooser pEndDateChooser;
    private javax.swing.JButton projAddButton;
    private javax.swing.JButton projClearButton;
    private javax.swing.JTextArea projComUptxt;
    private javax.swing.JTextArea projDesctxt;
    private com.toedter.calendar.JDateChooser projDueDate;
    private javax.swing.JRadioButton projIDRadioButton;
    private javax.swing.JRadioButton projIDRadioButton1;
    private javax.swing.JTextField projIDtxt;
    private javax.swing.JRadioButton projNameRadioButton;
    private javax.swing.JRadioButton projNameRadioButton1;
    private javax.swing.JTextField projNametxt;
    private javax.swing.JButton projRefreshSearchButton;
    private javax.swing.JButton projSearchButton;
    private javax.swing.JTable projSearchTable;
    private javax.swing.JTextField projSearchUptxt;
    private javax.swing.JTextField projSearchtxt;
    private com.toedter.calendar.JDateChooser projStartDate;
    private com.toedter.calendar.JDateChooser projUpDueDate;
    private javax.swing.JButton projUpRefreshButton;
    private javax.swing.JButton projUpSearchButton;
    private javax.swing.JButton projUpStatusButton;
    private java.awt.Choice projUpStatusChoice;
    private javax.swing.JTable projUpTable;
    private javax.swing.JButton projectsButton;
    private javax.swing.JTabbedPane projectsTab;
    private com.toedter.calendar.JDateChooser repDateSearchtxt;
    private javax.swing.JTable repHistoryTable;
    private javax.swing.JTextField repIDSearchtxt;
    private java.awt.Choice repProjStatchoice;
    private javax.swing.JButton repSearchButton;
    private javax.swing.JButton reportsButton;
    private javax.swing.JTabbedPane reportsTab;
    private javax.swing.JRadioButton searchRepDateRadioButton;
    private javax.swing.JRadioButton searchRepIDRadioButton;
    private javax.swing.JRadioButton searchRepStatRadioButton;
    private javax.swing.JButton showRepSearchButton;
    private javax.swing.JButton suppliersButton;
    private javax.swing.JTabbedPane suppliersTab;
    // End of variables declaration//GEN-END:variables

}