Java tutorial
/* * 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 3 permission has */ public class welcome3 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 = "ID"; String searchmethod2; String report_status; String oq; String iid; boolean openClose; String sFileName; //String searchmethod3; /** * Creates new form welcome */ public welcome3() { initComponents(); reportsTab.setVisible(false); AlertIcon.setVisible(false); QuantityChangeButton.setEnabled(false); dropManageUserLabel.setVisible(false); changePasswordLabel.setVisible(false); repDateSearchtxt.setVisible(false); repDateSearchtxt.setEnabled(false); int check = 0; try { String sql = "select flag from users where user_type=3"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); if (rs.next()) { check = rs.getInt("flag"); } if (check == 1) { AlertIcon.setVisible(true); QuantityChangeButton.setEnabled(true); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } /** * 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() { searchGroup = new javax.swing.ButtonGroup(); SupplierButtonGroup = new javax.swing.ButtonGroup(); AddUserSearchGroup = new javax.swing.ButtonGroup(); ProjectStatusReportGroup = new javax.swing.ButtonGroup(); jSeparator1 = new javax.swing.JSeparator(); jLabel4 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); projectsButton = new javax.swing.JButton(); reportsButton = new javax.swing.JButton(); logoutButton = new javax.swing.JButton(); jLayeredPane1 = new javax.swing.JLayeredPane(); 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(); AlertIcon = new javax.swing.JLabel(); QuantityChangeButton = new javax.swing.JButton(); jLabel9 = new javax.swing.JLabel(); manageUserButtonLabel = new javax.swing.JLabel(); changePasswordLabel = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); dropManageUserLabel = new javax.swing.JLabel(); changeLogoLabel = 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()); jSeparator1.setPreferredSize(new java.awt.Dimension(55, 10)); getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 222, 1240, 10)); 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)); 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)); 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)); 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)); 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)); 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(4); projDesctxt.setTabSize(0); jScrollPane13.setViewportView(projDesctxt); AddProjectPanel.add(jScrollPane13, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 260, 150, 90)); 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, 0, 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)); searchGroup.add(projNameRadioButton); 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)); searchGroup.add(projIDRadioButton); 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(5); projComUptxt.setRows(2); projComUptxt.setTabSize(0); jScrollPane15.setViewportView(projComUptxt); StatusProjectPanel.add(jScrollPane15, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 210, 150, 60)); 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, 0, 1250, 430)); 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)); searchGroup.add(projNameRadioButton1); 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)); searchGroup.add(projIDRadioButton1); 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, 0, 1250, 430)); 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)); ProjectStatusReportGroup.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)); ProjectStatusReportGroup.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)); ProjectStatusReportGroup.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)); ProjectStatusReportGroup.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)); searchGroup.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)); searchGroup.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)); searchGroup.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 Projects"); 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, 1250, Short.MAX_VALUE) .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jLayeredPane1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(projectsTab, javax.swing.GroupLayout.PREFERRED_SIZE, 1250, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))) .addGroup( jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jLayeredPane1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(reportsTab, javax.swing.GroupLayout.PREFERRED_SIZE, 1250, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)))); jLayeredPane1Layout.setVerticalGroup(jLayeredPane1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 430, Short.MAX_VALUE) .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jLayeredPane1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(projectsTab, javax.swing.GroupLayout.PREFERRED_SIZE, 430, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))) .addGroup( jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jLayeredPane1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(reportsTab, javax.swing.GroupLayout.PREFERRED_SIZE, 430, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)))); 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(20, 230, 1240, 430)); AlertIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/applet-critical-48.png"))); // NOI18N getContentPane().add(AlertIcon, new org.netbeans.lib.awtextra.AbsoluteConstraints(560, 160, -1, -1)); QuantityChangeButton.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Images/Quantity Change icon 53x50.png"))); // NOI18N QuantityChangeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { QuantityChangeButtonActionPerformed(evt); } }); getContentPane().add(QuantityChangeButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 110, 65, 60)); jLabel9.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N getContentPane().add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 150, 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.setForeground(new java.awt.Color(240, 240, 240)); 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)); getContentPane().add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(1150, 0, 40, 30)); dropManageUserLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/menu.png"))); // NOI18N getContentPane().add(dropManageUserLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 110, -1, -1)); changeLogoLabel.setForeground(new java.awt.Color(240, 240, 240)); changeLogoLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseMoved(java.awt.event.MouseEvent evt) { changeLogoLabelMouseMoved(evt); } }); changeLogoLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { changeLogoLabelMouseClicked(evt); } }); getContentPane().add(changeLogoLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 90, 106, 17)); 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 jLabel4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel4MouseClicked System.exit(0); }//GEN-LAST:event_jLabel4MouseClicked private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel3MouseClicked this.setState(welcome3.ICONIFIED); }//GEN-LAST:event_jLabel3MouseClicked 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 projectsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projectsButtonActionPerformed projectsTab.setVisible(true); reportsTab.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.execute(); JOptionPane.showMessageDialog(null, "Project Added"); } catch (Exception e) { h = 1; 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", "Error", 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 projIDRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projIDRadioButtonActionPerformed searchmethod = "proj_id"; }//GEN-LAST:event_projIDRadioButtonActionPerformed private void projNameRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_projNameRadioButtonActionPerformed searchmethod = "proj_name"; }//GEN-LAST:event_projNameRadioButtonActionPerformed private void projectsTabMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_projectsTabMouseClicked update_Status_ProjTable(); update_Search_ProjTable(); }//GEN-LAST:event_projectsTabMouseClicked 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 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 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 reportsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_reportsButtonActionPerformed projectsTab.setVisible(false); reportsTab.setVisible(true); }//GEN-LAST:event_reportsButtonActionPerformed private void QuantityChangeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_QuantityChangeButtonActionPerformed QuantityChange qc = new QuantityChange(); qc.pack(); qc.setLocationRelativeTo(null); qc.setVisible(true); }//GEN-LAST:event_QuantityChangeButtonActionPerformed 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 ProgressRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ProgressRadioButtonActionPerformed report_status = "In Progress"; }//GEN-LAST:event_ProgressRadioButtonActionPerformed private void AllRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AllRadioButtonActionPerformed report_status = "All"; }//GEN-LAST:event_AllRadioButtonActionPerformed private void CompletedRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CompletedRadioButtonActionPerformed report_status = "Completed"; }//GEN-LAST:event_CompletedRadioButtonActionPerformed 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 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 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 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 repSearchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_repSearchButtonActionPerformed if (searchmethod.equals("ID")) { try { String sn = repIDSearchtxt.getText(); String sql = "select report_no as 'Report No',report_create_date as 'Creation Date',repProj_start_date as 'Project Start Date',repProj_due_date as 'Project Due Date',repStatus as 'Status' 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 as 'Report No',report_create_date as 'Creation Date',repProj_start_date as 'Project Start Date',repProj_due_date as 'Project Due Date',repStatus as 'Status' 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 as 'Report No',report_create_date as 'Creation Date',repProj_start_date as 'Project Start Date',repProj_due_date as 'Project Due Date',repStatus as 'Status' 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 reportsTabMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportsTabMouseClicked rep_Search_Table(); }//GEN-LAST:event_reportsTabMouseClicked 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 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 jLabel3MouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel3MouseMoved jLabel3.setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY, 1)); }//GEN-LAST:event_jLabel3MouseMoved private void changeLogoLabelMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_changeLogoLabelMouseMoved // TODO add your handling code here: }//GEN-LAST:event_changeLogoLabelMouseMoved private void changeLogoLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_changeLogoLabelMouseClicked // TODO add your handling code here: }//GEN-LAST:event_changeLogoLabelMouseClicked private void RefreshButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RefreshButton2ActionPerformed rep_Search_Table(); }//GEN-LAST:event_RefreshButton2ActionPerformed /** * @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(welcome3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(welcome3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(welcome3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(welcome3.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 welcome3().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' 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); } } /** * Display the 'Alert' icon */ public void setAlertIconVisible() { AlertIcon.setVisible(false); } public void setButtonEnable() { QuantityChangeButton.setEnabled(false); } 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 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 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.ButtonGroup AddUserSearchGroup; private javax.swing.JLabel AlertIcon; private javax.swing.JRadioButton AllRadioButton; private javax.swing.JRadioButton CompletedRadioButton; private javax.swing.JLabel EnterYourSearchLabel10; private javax.swing.JLabel EnterYourSearchLabel2; 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.JPanel ProjectReportPanel; private javax.swing.JLabel ProjectStartdateLabel; private javax.swing.ButtonGroup ProjectStatusReportGroup; private javax.swing.JButton QuantityChangeButton; private javax.swing.JButton RefreshButton2; private javax.swing.JPanel SearchProjectPanel; private javax.swing.JButton Show_report_Button; private javax.swing.JPanel StatusProjectPanel; private javax.swing.ButtonGroup SupplierButtonGroup; 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 changeLogoLabel; private javax.swing.JLabel changePasswordLabel; private javax.swing.JLabel dropManageUserLabel; private javax.swing.JToggleButton genRepButton; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; 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 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.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.ButtonGroup searchGroup; private javax.swing.JRadioButton searchRepDateRadioButton; private javax.swing.JRadioButton searchRepIDRadioButton; private javax.swing.JRadioButton searchRepStatRadioButton; private javax.swing.JButton showRepSearchButton; // End of variables declaration//GEN-END:variables }