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 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 com.itextpdf.text.Image; import java.util.Date; import java.sql.*; import javax.swing.JOptionPane; import java.io.File; import javax.swing.JFileChooser; import javax.swing.filechooser.FileNameExtensionFilter; import net.proteanit.sql.DbUtils; import java.awt.*; import java.awt.Desktop; import java.io.File; import java.io.FileOutputStream; 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 java.text.DateFormat; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.concurrent.ThreadLocalRandom; import javax.swing.BorderFactory; import javax.swing.JTextField; import net.proteanit.sql.DbUtils; /** * * @author Adi Malka * @author Felix Vainer */ /** * This class display all the options that a user with a level 1 permission has */ public class welcome1 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_order; public String sn; public String fn; String tableClick; String searchmethod; String itemRepChoice = "All"; String oq; String iid; boolean openClose; String sFileName; /** * Creates new form welcome * Settings for GUI * Calling primary functions */ public welcome1() { initComponents(); ordersTab.setVisible(false); suppliersTab.setVisible(false); quantityChangesReqButton.setEnabled(false); MinLevelWarningButton.setEnabled(false); minLvlWarIcon.setVisible(false); dropManageUserLabel.setVisible(false); changePasswordLabel.setVisible(false); wareHouschoice.setVisible(false); repDateSearchtxt.setVisible(false); repDateSearchtxt.setEnabled(false); repStatusSearchtxt.setVisible(false); repStatusSearchtxt.setEnabled(false); update_table(); checkQReqTable(); checkMinQLvl(); } /** * 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() { jMenu3 = new javax.swing.JMenu(); itemRepbuttonGroup = new javax.swing.ButtonGroup(); jSeparator1 = new javax.swing.JSeparator(); ordersButton = new javax.swing.JButton(); suppliersButton = new javax.swing.JButton(); inventoryButton = new javax.swing.JButton(); reportsButton = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLayeredPane1 = new javax.swing.JLayeredPane(); inventoryTab = new javax.swing.JTabbedPane(); AddItemPanel = new javax.swing.JPanel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); serialText = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); nameText = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); descriptionText = new javax.swing.JTextArea(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); quantityText = new javax.swing.JTextField(); jLabel14 = new javax.swing.JLabel(); supplierText = new javax.swing.JTextField(); jLabel16 = new javax.swing.JLabel(); categoryChoice = new java.awt.Choice(); eDate = new com.toedter.calendar.JDateChooser(); addButton = new javax.swing.JButton(); clearButton = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); minLevelText = new javax.swing.JTextField(); Storage_panel = new javax.swing.JPanel(); Storage_Label = new javax.swing.JLabel(); Comments_Label = new javax.swing.JLabel(); Shelf_Text = new javax.swing.JTextField(); warehouse_label = new javax.swing.JLabel(); Row_label = new javax.swing.JLabel(); Row_Text = new javax.swing.JTextField(); Shelf__label = new javax.swing.JLabel(); Warehouse_Text = new javax.swing.JTextField(); jScrollPane3 = new javax.swing.JScrollPane(); Comments_Text = new javax.swing.JTextArea(); background_green = new javax.swing.JLabel(); jScrollBar2 = new javax.swing.JScrollBar(); UpdateItemPanel = new javax.swing.JPanel(); searchtxt = new javax.swing.JTextField(); jScrollPane2 = new javax.swing.JScrollPane(); itemTable = new javax.swing.JTable(); searchButton = new javax.swing.JButton(); minQtxt = new javax.swing.JTextField(); datetxt = new com.toedter.calendar.JDateChooser(); suppliertxt = new javax.swing.JTextField(); jScrollPane4 = new javax.swing.JScrollPane(); descriptiontxt = new javax.swing.JTextArea(); updateButton = new javax.swing.JButton(); EnterYourSearchLabel = new javax.swing.JLabel(); itemNameRadioButton = new javax.swing.JRadioButton(); itemIdRadioButton = new javax.swing.JRadioButton(); SupplierNameLabel2 = new javax.swing.JLabel(); MinQuantityLabel1 = new javax.swing.JLabel(); DescriptionLabel = new javax.swing.JLabel(); ExpirationDateLabel2 = new javax.swing.JLabel(); RefreshButton = new javax.swing.JButton(); Storage_panel2 = new javax.swing.JPanel(); Storage_Label2 = new javax.swing.JLabel(); warehouse_label2 = new javax.swing.JLabel(); Row_label2 = new javax.swing.JLabel(); Shelf__label2 = new javax.swing.JLabel(); wherhoustxt1 = new javax.swing.JTextField(); rawtxt1 = new javax.swing.JTextField(); shelftxt1 = new javax.swing.JTextField(); Storage_panel1 = new javax.swing.JPanel(); Storage_Label1 = new javax.swing.JLabel(); warehouse_label1 = new javax.swing.JLabel(); Row_label1 = new javax.swing.JLabel(); Shelf__label1 = new javax.swing.JLabel(); wherhoustxt = new javax.swing.JTextField(); rawtxt = new javax.swing.JTextField(); shelftxt = new javax.swing.JTextField(); jPanel24 = new javax.swing.JPanel(); Storage_Label4 = new javax.swing.JLabel(); quantitytxt = new javax.swing.JTextField(); QuantityLabel1 = new javax.swing.JLabel(); jLabel19 = new javax.swing.JLabel(); submitQButton = new javax.swing.JButton(); QuantityLabel2 = new javax.swing.JLabel(); commentQtxt = new javax.swing.JTextField(); deleteItemButton = new javax.swing.JButton(); quantityChangesReqButton = new javax.swing.JButton(); jLabel7 = new javax.swing.JLabel(); StatusItemPanel = new javax.swing.JPanel(); jScrollPane6 = new javax.swing.JScrollPane(); statusTable = new javax.swing.JTable(); searchStatustxt = new javax.swing.JTextField(); EnterYourSearchLabel2 = new javax.swing.JLabel(); searchStatusButton = new javax.swing.JButton(); sWorkerIdtxt = new javax.swing.JTextField(); amountFor = new javax.swing.JTextField(); sItemIdtxt = new javax.swing.JTextField(); dateStatus = new com.toedter.calendar.JDateChooser(); addStatusButton = new javax.swing.JButton(); oporationType = new java.awt.Choice(); refreshStausButton = new javax.swing.JButton(); jLabel15 = new javax.swing.JLabel(); jLabel17 = new javax.swing.JLabel(); jLabel18 = new javax.swing.JLabel(); jLabel20 = new javax.swing.JLabel(); jLabel21 = new javax.swing.JLabel(); minLvlWarIcon = new javax.swing.JLabel(); MinLevelWarningButton = new javax.swing.JButton(); jLabel8 = new javax.swing.JLabel(); SearchItemPanel = new javax.swing.JPanel(); jScrollPane5 = new javax.swing.JScrollPane(); itemSearchTable = new javax.swing.JTable(); searchtxt1 = new javax.swing.JTextField(); EnterYourSearchLabel1 = new javax.swing.JLabel(); searchButton1 = new javax.swing.JButton(); itemIdRadioButton1 = new javax.swing.JRadioButton(); itemNameRadioButton1 = new javax.swing.JRadioButton(); RefreshButton1 = new javax.swing.JButton(); jLabel6 = new javax.swing.JLabel(); ordersTab = new javax.swing.JTabbedPane(); AddOrderPanel = new javax.swing.JPanel(); orderTptxt = new javax.swing.JTextField(); orderTimeLabel = new javax.swing.JLabel(); orderArrivalLabel = new javax.swing.JLabel(); orderDescriptionLabel = new javax.swing.JLabel(); orderPriceLabel = new javax.swing.JLabel(); jScrollPane10 = new javax.swing.JScrollPane(); orderDesctxt = new javax.swing.JTextArea(); tooDate = new com.toedter.calendar.JDateChooser(); toaDate = new com.toedter.calendar.JDateChooser(); addOrderButton = new javax.swing.JButton(); orderClearButton = new javax.swing.JButton(); SupplierContractPanel1 = new javax.swing.JPanel(); OrderContractLabel = new javax.swing.JLabel(); OrderUploadText = new javax.swing.JTextField(); OrderUploadContractButton = new javax.swing.JButton(); OrderShowContractButton = new javax.swing.JButton(); OrderIDLabel = new javax.swing.JLabel(); OrderIDText = new javax.swing.JTextField(); jLabel22 = new javax.swing.JLabel(); suppNamechoice = new java.awt.Choice(); background_green4 = new javax.swing.JLabel(); UpdateOrderPanel = new javax.swing.JPanel(); EnterYourSearchLabel5 = new javax.swing.JLabel(); searchUpOrdertxt = new javax.swing.JTextField(); searchOrderUpButton = new javax.swing.JButton(); jScrollPane9 = new javax.swing.JScrollPane(); orderUpdateTable = new javax.swing.JTable(); toaUpdate = new com.toedter.calendar.JDateChooser(); jScrollPane11 = new javax.swing.JScrollPane(); orderDescUptxt = new javax.swing.JTextArea(); tpUptxt = new javax.swing.JTextField(); refreshUpdateOrderButton = new javax.swing.JButton(); orderUpdateButton = new javax.swing.JButton(); UpdatetoaLabel = new javax.swing.JLabel(); UpdateDescriptionLabel = new javax.swing.JLabel(); UpdatetpLabel = new javax.swing.JLabel(); jLabel24 = new javax.swing.JLabel(); background_green9 = new javax.swing.JLabel(); PriceListPanel = new javax.swing.JPanel(); itemIDPricetxt = new javax.swing.JTextField(); searchPLButton = new javax.swing.JButton(); jScrollPane20 = new javax.swing.JScrollPane(); priceListTable = new javax.swing.JTable(); refreshPLButton = new javax.swing.JButton(); itemIdPLtxt = new javax.swing.JTextField(); pricePLtxt = new javax.swing.JTextField(); supplierIdPLtxt = new javax.swing.JTextField(); supplierNamePLtxt = new javax.swing.JTextField(); addPLButton = new javax.swing.JButton(); jLabel25 = new javax.swing.JLabel(); jLabel26 = new javax.swing.JLabel(); jLabel27 = new javax.swing.JLabel(); jLabel28 = new javax.swing.JLabel(); EnterYourSearchLabel11 = new javax.swing.JLabel(); jLabel32 = new javax.swing.JLabel(); background_green15 = new javax.swing.JLabel(); SearchOrderPanel = new javax.swing.JPanel(); searchOrdertxt = new javax.swing.JTextField(); searchOrderButton = new javax.swing.JButton(); jScrollPane12 = new javax.swing.JScrollPane(); orderSearchTable = new javax.swing.JTable(); orderRefreshButton = new javax.swing.JButton(); EnterYourSearchLabel8 = new javax.swing.JLabel(); Show_Contract_Button = new javax.swing.JButton(); background_green10 = new javax.swing.JLabel(); 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_green5 = 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_green6 = 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_green7 = new javax.swing.JLabel(); SupplierContractIDText2 = new javax.swing.JTextField(); reportTab = new javax.swing.JTabbedPane(); InventoryReport = new javax.swing.JPanel(); allItemRepRadioButton = new javax.swing.JRadioButton(); minLevelRepRadioButton = new javax.swing.JRadioButton(); wareHousRepRadioButton = new javax.swing.JRadioButton(); wareHouschoice = new java.awt.Choice(); genrateItemRepButton = new javax.swing.JButton(); showInventoryRepButton = new javax.swing.JButton(); jLabel23 = new javax.swing.JLabel(); jLabel29 = new javax.swing.JLabel(); jLabel30 = new javax.swing.JLabel(); jLabel31 = new javax.swing.JLabel(); background_green8 = new javax.swing.JLabel(); InventoryHistoryReport = new javax.swing.JPanel(); jScrollPane7 = new javax.swing.JScrollPane(); items_rep_Search_Table = new javax.swing.JTable(); searchRepDateRadioButton = new javax.swing.JRadioButton(); searchRepStatRadioButton = new javax.swing.JRadioButton(); searchRepIDRadioButton = new javax.swing.JRadioButton(); repDateSearchtxt = new com.toedter.calendar.JDateChooser(); repSearchButton = new javax.swing.JButton(); showRepSearchButton = new javax.swing.JButton(); repStatusSearchtxt = new java.awt.Choice(); repIDSearchTxt = new javax.swing.JTextField(); EnterYourSearchLabel3 = new javax.swing.JLabel(); RefreshButton2 = new javax.swing.JButton(); background_green11 = new javax.swing.JLabel(); logoutButton = new javax.swing.JButton(); manageUserButtonLabel = new javax.swing.JLabel(); changePasswordLabel = new javax.swing.JLabel(); dropManageUserLabel = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jMenu3.setText("jMenu3"); 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)); ordersButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Orders icon 53 x 50.png"))); // NOI18N ordersButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ordersButtonActionPerformed(evt); } }); getContentPane().add(ordersButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 110, 65, 60)); 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(590, 110, 65, 60)); inventoryButton .setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Inventory icon 53 x 50.png"))); // NOI18N inventoryButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { inventoryButtonActionPerformed(evt); } }); getContentPane().add(inventoryButton, 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(670, 110, 65, 60)); jLabel1.setFont(new java.awt.Font("Calibri", 0, 24)); // NOI18N getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 150, 210, 50)); jLabel1.setText(loginGUI.username + " Is Logged in"); 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)); inventoryTab.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N inventoryTab.setMinimumSize(new java.awt.Dimension(1255, 674)); inventoryTab.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { inventoryTabMouseClicked(evt); } }); AddItemPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel9.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel9.setText("Name"); AddItemPanel.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 110, 40, -1)); jLabel10.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel10.setText("Item ID"); AddItemPanel.add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, -1, -1)); AddItemPanel.add(serialText, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 70, 160, -1)); jLabel11.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel11.setText("Quantity"); AddItemPanel.add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 70, -1, -1)); nameText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nameTextActionPerformed(evt); } }); AddItemPanel.add(nameText, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 110, 160, -1)); jScrollPane1.setBorder(null); jScrollPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jScrollPane1.setDebugGraphicsOptions(javax.swing.DebugGraphics.NONE_OPTION); jScrollPane1.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N jScrollPane1.setPreferredSize(new java.awt.Dimension(60, 60)); descriptionText.setColumns(20); descriptionText.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N descriptionText.setLineWrap(true); descriptionText.setRows(4); descriptionText.setTabSize(0); descriptionText.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); jScrollPane1.setViewportView(descriptionText); AddItemPanel.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 290, 240, 80)); jLabel12.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel12.setText("Category Name"); AddItemPanel.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 240, -1, -1)); jLabel13.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel13.setText("Supplier Name "); AddItemPanel.add(jLabel13, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 150, -1, -1)); quantityText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { quantityTextActionPerformed(evt); } }); AddItemPanel.add(quantityText, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 70, 160, -1)); jLabel14.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel14.setText("Expiration Date"); AddItemPanel.add(jLabel14, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 190, -1, -1)); supplierText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { supplierTextActionPerformed(evt); } }); AddItemPanel.add(supplierText, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 150, 160, -1)); jLabel16.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel16.setText("Description"); AddItemPanel.add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 290, -1, -1)); categoryChoice.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { categoryChoiceMouseClicked(evt); } }); AddItemPanel.add(categoryChoice, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 240, 160, -1)); categoryChoice.addItem("paints"); categoryChoice.addItem("Packaging"); categoryChoice.addItem("Sand Blast"); eDate.setDateFormatString("yyyy-MM-dd"); eDate.setMinSelectableDate(new Date()); eDate.setPreferredSize(new java.awt.Dimension(91, 30)); AddItemPanel.add(eDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 190, 160, 30)); addButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N addButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/plus_icon.png"))); // NOI18N addButton.setText("Add"); addButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addButtonActionPerformed(evt); } }); AddItemPanel.add(addButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 330, -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); } }); AddItemPanel.add(clearButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(910, 330, 90, 40)); jLabel5.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel5.setText("Min Quantity Level"); AddItemPanel.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 110, -1, -1)); AddItemPanel.add(minLevelText, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 110, 160, -1)); Storage_panel.setBackground(new java.awt.Color(233, 232, 232)); Storage_panel.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true)); Storage_panel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); Storage_Label.setFont(new java.awt.Font("Calibri", 1, 24)); // NOI18N Storage_Label.setText("Storage"); Storage_panel.add(Storage_Label, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 90, 30)); Comments_Label.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N Comments_Label.setText("Comments"); Storage_panel.add(Comments_Label, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 50, -1, -1)); Shelf_Text.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Shelf_TextActionPerformed(evt); } }); Storage_panel.add(Shelf_Text, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 130, 80, -1)); warehouse_label.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N warehouse_label.setText("Warehouse"); Storage_panel.add(warehouse_label, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 50, -1, -1)); Row_label.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N Row_label.setText("Row"); Storage_panel.add(Row_label, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 90, -1, -1)); Row_Text.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Row_TextActionPerformed(evt); } }); Storage_panel.add(Row_Text, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 90, 80, -1)); Shelf__label.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N Shelf__label.setText("Shelf"); Storage_panel.add(Shelf__label, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 130, -1, -1)); Warehouse_Text.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Warehouse_TextActionPerformed(evt); } }); Storage_panel.add(Warehouse_Text, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 50, 80, -1)); Comments_Text.setColumns(20); Comments_Text.setRows(5); jScrollPane3.setViewportView(Comments_Text); Storage_panel.add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 50, 150, 90)); AddItemPanel.add(Storage_panel, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 150, 470, 170)); background_green.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N AddItemPanel.add(background_green, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440)); AddItemPanel.add(jScrollBar2, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 310, -1, -1)); inventoryTab.addTab("Add Item", AddItemPanel); UpdateItemPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); UpdateItemPanel.add(searchtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 160, -1)); itemTable.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, null, null, null, null, null, null }, { null, null, null, null, null, null, null, null, null, null }, { null, null, null, null, null, null, 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[] { "Item ID", "Item Name", "Expiration Date", "Supplier Name", "Quantity", "Min Quantity Level", "Description", "Warehouse", "Row", "Shelf" }) { boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); itemTable.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); itemTable.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { itemTableMouseClicked(evt); } }); jScrollPane2.setViewportView(itemTable); UpdateItemPanel.add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 10, 910, 230)); searchButton.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N searchButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N searchButton.setText("Search"); searchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchButtonActionPerformed(evt); } }); UpdateItemPanel.add(searchButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 40, -1, -1)); UpdateItemPanel.add(minQtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 170, 100, -1)); datetxt.setDateFormatString("yyyy-MM-dd"); datetxt.setMinSelectableDate(new Date()); UpdateItemPanel.add(datetxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 210, 130, -1)); UpdateItemPanel.add(suppliertxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 130, 100, -1)); descriptiontxt.setColumns(20); descriptiontxt.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N descriptiontxt.setRows(4); descriptiontxt.setTabSize(0); jScrollPane4.setViewportView(descriptiontxt); UpdateItemPanel.add(jScrollPane4, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 250, 150, 100)); updateButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N updateButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/save-icon-30.png"))); // NOI18N updateButton.setText("Update"); updateButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { updateButtonActionPerformed(evt); } }); UpdateItemPanel.add(updateButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 250, -1, -1)); EnterYourSearchLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N EnterYourSearchLabel.setText("Enter your Search"); UpdateItemPanel.add(EnterYourSearchLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1)); itemNameRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N itemNameRadioButton.setText("By Name"); itemNameRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder()); itemNameRadioButton.setBorderPainted(true); itemNameRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { itemNameRadioButtonActionPerformed(evt); } }); UpdateItemPanel.add(itemNameRadioButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 80, 90, -1)); itemIdRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N itemIdRadioButton.setText("By ID"); itemIdRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder()); itemIdRadioButton.setBorderPainted(true); itemIdRadioButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); itemIdRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { itemIdRadioButtonActionPerformed(evt); } }); UpdateItemPanel.add(itemIdRadioButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 60, -1)); SupplierNameLabel2.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N SupplierNameLabel2.setText("Supplier Name "); UpdateItemPanel.add(SupplierNameLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 130, -1, -1)); MinQuantityLabel1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N MinQuantityLabel1.setText("Min Quantity Level"); UpdateItemPanel.add(MinQuantityLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 170, -1, -1)); DescriptionLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N DescriptionLabel.setText("Description"); UpdateItemPanel.add(DescriptionLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 250, -1, -1)); ExpirationDateLabel2.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N ExpirationDateLabel2.setText("Expiration date"); UpdateItemPanel.add(ExpirationDateLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 210, -1, -1)); RefreshButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N RefreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N RefreshButton.setText("Refresh"); RefreshButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RefreshButtonActionPerformed(evt); } }); UpdateItemPanel.add(RefreshButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(1080, 250, -1, -1)); Storage_panel2.setBackground(new java.awt.Color(233, 232, 232)); Storage_panel2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true)); Storage_panel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); Storage_Label2.setFont(new java.awt.Font("Calibri", 1, 24)); // NOI18N Storage_Label2.setText("Storage"); Storage_panel2.add(Storage_Label2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, 90, 30)); warehouse_label2.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N warehouse_label2.setText("Warehouse"); Storage_panel2.add(warehouse_label2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, -1, -1)); Row_label2.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N Row_label2.setText("Row"); Storage_panel2.add(Row_label2, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 70, -1, -1)); Shelf__label2.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N Shelf__label2.setText("Shelf"); Storage_panel2.add(Shelf__label2, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 100, -1, -1)); Storage_panel2.add(wherhoustxt1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 40, 100, -1)); Storage_panel2.add(rawtxt1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 70, 100, -1)); Storage_panel2.add(shelftxt1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 100, 100, -1)); Storage_panel1.setBackground(new java.awt.Color(233, 232, 232)); Storage_panel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true)); Storage_panel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); Storage_Label1.setFont(new java.awt.Font("Calibri", 1, 24)); // NOI18N Storage_Label1.setText("Storage"); Storage_panel1.add(Storage_Label1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, 90, 30)); warehouse_label1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N warehouse_label1.setText("Warehouse"); Storage_panel1.add(warehouse_label1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, -1, -1)); Row_label1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N Row_label1.setText("Row"); Storage_panel1.add(Row_label1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 70, -1, -1)); Shelf__label1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N Shelf__label1.setText("Shelf"); Storage_panel1.add(Shelf__label1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 100, -1, -1)); Storage_panel1.add(wherhoustxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 40, 90, -1)); Storage_panel1.add(rawtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 70, 90, -1)); Storage_panel1.add(shelftxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 100, 90, -1)); Storage_panel2.add(Storage_panel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 245, 210, 140)); UpdateItemPanel.add(Storage_panel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 245, 210, 140)); jPanel24.setBackground(new java.awt.Color(233, 232, 232)); jPanel24.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true)); jPanel24.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); Storage_Label4.setFont(new java.awt.Font("Calibri", 1, 24)); // NOI18N Storage_Label4.setText("Stock Change"); jPanel24.add(Storage_Label4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, 160, 30)); jPanel24.add(quantitytxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 30, 90, -1)); QuantityLabel1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N QuantityLabel1.setText("Comments"); jPanel24.add(QuantityLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 60, -1, -1)); jLabel19.setFont(new java.awt.Font("Calibri", 0, 11)); // NOI18N jLabel19.setForeground(new java.awt.Color(255, 0, 0)); jLabel19.setText("Any change requiers manager approval"); jPanel24.add(jLabel19, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 85, -1, -1)); submitQButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N submitQButton.setText("Submit"); submitQButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { submitQButtonActionPerformed(evt); } }); jPanel24.add(submitQButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 100, 130, -1)); QuantityLabel2.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N QuantityLabel2.setText("New Quantity"); jPanel24.add(QuantityLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, -1, -1)); jPanel24.add(commentQtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 60, 90, -1)); UpdateItemPanel.add(jPanel24, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 245, 230, 140)); deleteItemButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N deleteItemButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/delete icon.png"))); // NOI18N deleteItemButton.setText("delete"); deleteItemButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteItemButtonActionPerformed(evt); } }); UpdateItemPanel.add(deleteItemButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(940, 250, 130, -1)); quantityChangesReqButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N quantityChangesReqButton.setText("Quantity Change Requests"); quantityChangesReqButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { quantityChangesReqButtonActionPerformed(evt); } }); UpdateItemPanel.add(quantityChangesReqButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 310, 210, 50)); jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N UpdateItemPanel.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440)); inventoryTab.addTab("Update", UpdateItemPanel); StatusItemPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); statusTable.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[] { "Item ID", "Worker ID", "Date", "Amount Of Operation", "Quantity Trace", "Operation Type" }) { boolean[] canEdit = new boolean[] { false, false, false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); statusTable.setFocusCycleRoot(true); jScrollPane6.setViewportView(statusTable); StatusItemPanel.add(jScrollPane6, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 10, 790, 200)); StatusItemPanel.add(searchStatustxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 160, -1)); EnterYourSearchLabel2.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N EnterYourSearchLabel2.setText("Enter your search"); StatusItemPanel.add(EnterYourSearchLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1)); searchStatusButton.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N searchStatusButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N searchStatusButton.setText("Search"); searchStatusButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchStatusButtonActionPerformed(evt); } }); StatusItemPanel.add(searchStatusButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 40, -1, -1)); StatusItemPanel.add(sWorkerIdtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 150, 100, -1)); StatusItemPanel.add(amountFor, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 190, 100, -1)); StatusItemPanel.add(sItemIdtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 110, 100, -1)); dateStatus.setDateFormatString("yyyy-MM-dd"); dateStatus.setMinSelectableDate(new Date()); StatusItemPanel.add(dateStatus, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 270, 150, -1)); addStatusButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N addStatusButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/submit.png"))); // NOI18N addStatusButton.setText("Commit"); addStatusButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addStatusButtonActionPerformed(evt); } }); StatusItemPanel.add(addStatusButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(800, 220, 140, 40)); StatusItemPanel.add(oporationType, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 230, 110, -1)); oporationType.addItem("Add"); oporationType.addItem("Subtract"); refreshStausButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N refreshStausButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N refreshStausButton.setText("Refresh"); refreshStausButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { refreshStausButtonActionPerformed(evt); } }); StatusItemPanel.add(refreshStausButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(960, 220, 130, 40)); jLabel15.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel15.setText("Item ID"); StatusItemPanel.add(jLabel15, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 110, -1, -1)); jLabel17.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel17.setText("Worker ID"); StatusItemPanel.add(jLabel17, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 150, -1, -1)); jLabel18.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel18.setText("Amount "); StatusItemPanel.add(jLabel18, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 190, -1, -1)); jLabel20.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel20.setText("Operation Type"); StatusItemPanel.add(jLabel20, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 230, -1, -1)); jLabel21.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel21.setText("Date"); StatusItemPanel.add(jLabel21, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 270, -1, -1)); minLvlWarIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/applet-critical-48.png"))); // NOI18N StatusItemPanel.add(minLvlWarIcon, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 250, -1, 30)); MinLevelWarningButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N MinLevelWarningButton.setText("Min Level Warnings"); MinLevelWarningButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { MinLevelWarningButtonActionPerformed(evt); } }); StatusItemPanel.add(MinLevelWarningButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 220, -1, 40)); jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N StatusItemPanel.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440)); inventoryTab.addTab("Traffic", StatusItemPanel); SearchItemPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); itemSearchTable.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, null, null, null, null, null, null }, { null, null, null, null, null, null, null, null, null, null } }, new String[] { "Item ID", "Item Name", "Expiration Date", "Supplier Name", "Quantity", "Min Quantity Level", "Description", "Warehouse", "Row", "Shelf" }) { boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); itemSearchTable.setFocusCycleRoot(true); itemSearchTable.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { itemSearchTableMouseClicked(evt); } }); jScrollPane5.setViewportView(itemSearchTable); SearchItemPanel.add(jScrollPane5, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 10, 910, 230)); SearchItemPanel.add(searchtxt1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 160, -1)); EnterYourSearchLabel1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N EnterYourSearchLabel1.setText("Enter your search"); SearchItemPanel.add(EnterYourSearchLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1)); searchButton1.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N searchButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N searchButton1.setText("Search"); searchButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchButton1ActionPerformed(evt); } }); SearchItemPanel.add(searchButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 40, -1, -1)); itemIdRadioButton1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N itemIdRadioButton1.setText("By ID"); itemIdRadioButton1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); itemIdRadioButton1.setBorderPainted(true); itemIdRadioButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); itemIdRadioButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { itemIdRadioButton1ActionPerformed(evt); } }); SearchItemPanel.add(itemIdRadioButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 60, -1)); itemNameRadioButton1.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N itemNameRadioButton1.setText("By Name"); itemNameRadioButton1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); itemNameRadioButton1.setBorderPainted(true); itemNameRadioButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { itemNameRadioButton1ActionPerformed(evt); } }); SearchItemPanel.add(itemNameRadioButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 80, 90, -1)); RefreshButton1.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N RefreshButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N RefreshButton1.setText("Refresh"); RefreshButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RefreshButton1ActionPerformed(evt); } }); SearchItemPanel.add(RefreshButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(1080, 250, -1, -1)); jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N SearchItemPanel.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440)); inventoryTab.addTab("Search", SearchItemPanel); ordersTab.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N ordersTab.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { ordersTabMouseClicked(evt); } }); AddOrderPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); AddOrderPanel.add(orderTptxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 220, 118, -1)); orderTimeLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N orderTimeLabel.setText("Order Date"); AddOrderPanel.add(orderTimeLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 90, -1, -1)); orderArrivalLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N orderArrivalLabel.setText("Time Of Arrival"); AddOrderPanel.add(orderArrivalLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 130, -1, -1)); orderDescriptionLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N orderDescriptionLabel.setText("Description"); AddOrderPanel.add(orderDescriptionLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 260, -1, -1)); orderPriceLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N orderPriceLabel.setText("Total Price"); AddOrderPanel.add(orderPriceLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 220, -1, -1)); orderDesctxt.setColumns(10); orderDesctxt.setRows(4); orderDesctxt.setTabSize(0); jScrollPane10.setViewportView(orderDesctxt); AddOrderPanel.add(jScrollPane10, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 260, 230, 100)); tooDate.setDateFormatString("yyyy-MM-dd"); AddOrderPanel.add(tooDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 90, 140, -1)); toaDate.setDateFormatString("yyyy-MM-dd"); AddOrderPanel.add(toaDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 130, 140, -1)); addOrderButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N addOrderButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/plus_icon.png"))); // NOI18N addOrderButton.setText("Add"); addOrderButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addOrderButtonActionPerformed(evt); } }); AddOrderPanel.add(addOrderButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 210, -1, -1)); orderClearButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N orderClearButton.setText("Clear"); orderClearButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { orderClearButtonActionPerformed(evt); } }); AddOrderPanel.add(orderClearButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(660, 210, 100, 40)); SupplierContractPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true)); SupplierContractPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); OrderContractLabel.setFont(new java.awt.Font("Calibri", 0, 24)); // NOI18N OrderContractLabel.setText("Order Receipt"); SupplierContractPanel1.add(OrderContractLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1)); OrderUploadText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OrderUploadTextActionPerformed(evt); } }); SupplierContractPanel1.add(OrderUploadText, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 210, -1)); OrderUploadContractButton.setFont(new java.awt.Font("Tahoma", 0, 13)); // NOI18N OrderUploadContractButton.setText("Upload"); OrderUploadContractButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OrderUploadContractButtonActionPerformed(evt); } }); SupplierContractPanel1.add(OrderUploadContractButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, -1, -1)); OrderShowContractButton.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N OrderShowContractButton.setText("Show"); OrderShowContractButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OrderShowContractButtonActionPerformed(evt); } }); SupplierContractPanel1.add(OrderShowContractButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 80, 80, -1)); AddOrderPanel.add(SupplierContractPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(510, 70, 260, 130)); OrderIDLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N OrderIDLabel.setText("Order ID"); AddOrderPanel.add(OrderIDLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 50, -1, -1)); OrderIDText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OrderIDTextActionPerformed(evt); } }); AddOrderPanel.add(OrderIDText, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 50, 120, -1)); jLabel22.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel22.setText("Supplier Name"); AddOrderPanel.add(jLabel22, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 170, 100, 20)); try { String sn; String sql = "select distinct supplier_name from suppliers"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); while (rs.next()) { sn = rs.getString("supplier_name"); suppNamechoice.addItem(sn); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } AddOrderPanel.add(suppNamechoice, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 170, 120, -1)); background_green4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N AddOrderPanel.add(background_green4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -220, -1, 860)); ordersTab.addTab("Add Order", AddOrderPanel); UpdateOrderPanel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { UpdateOrderPanelMouseClicked(evt); } }); UpdateOrderPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); EnterYourSearchLabel5.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N EnterYourSearchLabel5.setText("Enter your search by Order ID"); UpdateOrderPanel.add(EnterYourSearchLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1)); UpdateOrderPanel.add(searchUpOrdertxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 160, -1)); searchOrderUpButton.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N searchOrderUpButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N searchOrderUpButton.setText("Search"); searchOrderUpButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchOrderUpButtonActionPerformed(evt); } }); UpdateOrderPanel.add(searchOrderUpButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 40, -1, -1)); orderUpdateTable .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" })); orderUpdateTable.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { orderUpdateTableMouseClicked(evt); } }); jScrollPane9.setViewportView(orderUpdateTable); UpdateOrderPanel.add(jScrollPane9, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 20, 800, 220)); UpdateOrderPanel.add(toaUpdate, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 100, 130, -1)); orderDescUptxt.setColumns(5); orderDescUptxt.setRows(4); orderDescUptxt.setTabSize(0); jScrollPane11.setViewportView(orderDescUptxt); UpdateOrderPanel.add(jScrollPane11, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 140, 130, 80)); UpdateOrderPanel.add(tpUptxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 240, 106, -1)); refreshUpdateOrderButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N refreshUpdateOrderButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N refreshUpdateOrderButton.setText("Refresh"); refreshUpdateOrderButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { refreshUpdateOrderButtonActionPerformed(evt); } }); UpdateOrderPanel.add(refreshUpdateOrderButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(1010, 250, -1, -1)); orderUpdateButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N orderUpdateButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/save-icon-30.png"))); // NOI18N orderUpdateButton.setText("Update"); orderUpdateButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { orderUpdateButtonActionPerformed(evt); } }); UpdateOrderPanel.add(orderUpdateButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(870, 250, -1, -1)); UpdatetoaLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N UpdatetoaLabel.setText("Time Of Arrival"); UpdateOrderPanel.add(UpdatetoaLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 100, -1, -1)); UpdateDescriptionLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N UpdateDescriptionLabel.setText("Description"); UpdateOrderPanel.add(UpdateDescriptionLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 140, -1, -1)); UpdatetpLabel.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N UpdatetpLabel.setText("Total Price"); UpdateOrderPanel.add(UpdatetpLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 240, -1, -1)); jLabel24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Untitled.png"))); // NOI18N UpdateOrderPanel.add(jLabel24, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 240, 30, 30)); background_green9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N UpdateOrderPanel.add(background_green9, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440)); ordersTab.addTab("Update", UpdateOrderPanel); PriceListPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); PriceListPanel.add(itemIDPricetxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 160, -1)); searchPLButton.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N searchPLButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N searchPLButton.setText("Search"); searchPLButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchPLButtonActionPerformed(evt); } }); PriceListPanel.add(searchPLButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 40, -1, -1)); priceListTable .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" })); jScrollPane20.setViewportView(priceListTable); PriceListPanel.add(jScrollPane20, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 20, 800, 220)); refreshPLButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N refreshPLButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N refreshPLButton.setText("Refresh"); refreshPLButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { refreshPLButtonActionPerformed(evt); } }); PriceListPanel.add(refreshPLButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(1010, 250, -1, -1)); PriceListPanel.add(itemIdPLtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 100, 100, -1)); PriceListPanel.add(pricePLtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 140, 100, -1)); PriceListPanel.add(supplierIdPLtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 180, 100, -1)); PriceListPanel.add(supplierNamePLtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 230, 100, -1)); addPLButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N addPLButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/plus_icon.png"))); // NOI18N addPLButton.setText("Add"); addPLButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addPLButtonActionPerformed(evt); } }); PriceListPanel.add(addPLButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(890, 250, -1, -1)); jLabel25.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel25.setText("Item ID"); PriceListPanel.add(jLabel25, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 100, -1, -1)); jLabel26.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel26.setText("Price"); PriceListPanel.add(jLabel26, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 140, -1, -1)); jLabel27.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel27.setText("Supplier ID"); PriceListPanel.add(jLabel27, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 180, -1, -1)); jLabel28.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N jLabel28.setText("Supplier Name"); PriceListPanel.add(jLabel28, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 230, -1, -1)); EnterYourSearchLabel11.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N EnterYourSearchLabel11.setText("Enter your search by Order ID"); PriceListPanel.add(EnterYourSearchLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1)); jLabel32.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Untitled.png"))); // NOI18N PriceListPanel.add(jLabel32, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 130, 30, 30)); background_green15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N PriceListPanel.add(background_green15, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1250, 440)); ordersTab.addTab("Price List", PriceListPanel); SearchOrderPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); searchOrdertxt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchOrdertxtActionPerformed(evt); } }); SearchOrderPanel.add(searchOrdertxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 160, -1)); searchOrderButton.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N searchOrderButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/search.png"))); // NOI18N searchOrderButton.setText("Search"); searchOrderButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchOrderButtonActionPerformed(evt); } }); SearchOrderPanel.add(searchOrderButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 40, -1, -1)); orderSearchTable .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" })); orderSearchTable.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { orderSearchTableMouseClicked(evt); } }); jScrollPane12.setViewportView(orderSearchTable); SearchOrderPanel.add(jScrollPane12, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 20, 800, 220)); orderRefreshButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N orderRefreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/refresh.png"))); // NOI18N orderRefreshButton.setText("Refresh"); orderRefreshButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { orderRefreshButtonActionPerformed(evt); } }); SearchOrderPanel.add(orderRefreshButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(1010, 250, -1, -1)); EnterYourSearchLabel8.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N EnterYourSearchLabel8.setText("Enter your search by Order ID"); SearchOrderPanel.add(EnterYourSearchLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1)); Show_Contract_Button.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N Show_Contract_Button .setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icon-service-contract.png"))); // NOI18N Show_Contract_Button.setText("Show Order"); Show_Contract_Button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { Show_Contract_ButtonActionPerformed(evt); } }); SearchOrderPanel.add(Show_Contract_Button, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 250, 170, 40)); background_green10.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N background_green10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N SearchOrderPanel.add(background_green10, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440)); ordersTab.addTab("Search", SearchOrderPanel); suppliersTab.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N suppliersTab.setMinimumSize(new java.awt.Dimension(1255, 674)); 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_green5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N AddSupplierPanel.add(background_green5, 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_green6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N UpdateSupplierPanel.add(background_green6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440)); 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_green7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N SearchSupplierPanel.add(background_green7, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440)); SupplierContractIDText2.setText("jTextField1"); SearchSupplierPanel.add(SupplierContractIDText2, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 200, -1, -1)); suppliersTab.addTab("Search", SearchSupplierPanel); reportTab.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N reportTab.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { reportTabMouseClicked(evt); } }); InventoryReport.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); itemRepbuttonGroup.add(allItemRepRadioButton); allItemRepRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N allItemRepRadioButton.setText("Show All"); allItemRepRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder()); allItemRepRadioButton.setBorderPainted(true); allItemRepRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { allItemRepRadioButtonActionPerformed(evt); } }); InventoryReport.add(allItemRepRadioButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 120, 90, -1)); itemRepbuttonGroup.add(minLevelRepRadioButton); minLevelRepRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N minLevelRepRadioButton.setText("Min Level"); minLevelRepRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder()); minLevelRepRadioButton.setBorderPainted(true); minLevelRepRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { minLevelRepRadioButtonActionPerformed(evt); } }); InventoryReport.add(minLevelRepRadioButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 120, 90, -1)); itemRepbuttonGroup.add(wareHousRepRadioButton); wareHousRepRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N wareHousRepRadioButton.setText("By Warehouse"); wareHousRepRadioButton.setBorder(javax.swing.BorderFactory.createEtchedBorder()); wareHousRepRadioButton.setBorderPainted(true); wareHousRepRadioButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { wareHousRepRadioButtonActionPerformed(evt); } }); InventoryReport.add(wareHousRepRadioButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(640, 120, 120, -1)); wareHouschoice.add("A"); wareHouschoice.add("B"); InventoryReport.add(wareHouschoice, new org.netbeans.lib.awtextra.AbsoluteConstraints(650, 150, 50, -1)); genrateItemRepButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N genrateItemRepButton.setText("Generate Report"); genrateItemRepButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { genrateItemRepButtonActionPerformed(evt); } }); InventoryReport.add(genrateItemRepButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 190, -1, 40)); showInventoryRepButton.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N showInventoryRepButton .setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icon-service-contract.png"))); // NOI18N showInventoryRepButton.setText("Show Report"); showInventoryRepButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { showInventoryRepButtonActionPerformed(evt); } }); InventoryReport.add(showInventoryRepButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(470, 250, 190, 40)); jLabel23.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N jLabel23.setText("This report shows current inventory by a chosen criteria. "); InventoryReport.add(jLabel23, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 70, -1, -1)); jLabel29.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N jLabel29.setText("Chose a report criteria"); InventoryReport.add(jLabel29, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 120, -1, -1)); jLabel30.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N jLabel30.setText("Click on "); InventoryReport.add(jLabel30, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 200, -1, -1)); jLabel31.setFont(new java.awt.Font("Calibri", 0, 20)); // NOI18N jLabel31.setText("You can see the report here "); InventoryReport.add(jLabel31, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 260, -1, -1)); background_green8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N InventoryReport.add(background_green8, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440)); reportTab.addTab("Inventory Report", InventoryReport); InventoryHistoryReport.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); items_rep_Search_Table .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" })); jScrollPane7.setViewportView(items_rep_Search_Table); InventoryHistoryReport.add(jScrollPane7, new org.netbeans.lib.awtextra.AbsoluteConstraints(450, 20, 700, 290)); itemRepbuttonGroup.add(searchRepDateRadioButton); searchRepDateRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N searchRepDateRadioButton.setText("By Report 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); } }); InventoryHistoryReport.add(searchRepDateRadioButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(250, 100, 130, -1)); itemRepbuttonGroup.add(searchRepStatRadioButton); searchRepStatRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N searchRepStatRadioButton.setText("By Criteria"); 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); } }); InventoryHistoryReport.add(searchRepStatRadioButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 100, 100, -1)); itemRepbuttonGroup.add(searchRepIDRadioButton); searchRepIDRadioButton.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N searchRepIDRadioButton.setSelected(true); 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); } }); InventoryHistoryReport.add(searchRepIDRadioButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 100, 110, -1)); repDateSearchtxt.setDateFormatString("yyyy-MM-dd"); InventoryHistoryReport.add(repDateSearchtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 60, 150, -1)); 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); } }); InventoryHistoryReport.add(repSearchButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 50, -1, -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); } }); InventoryHistoryReport.add(showRepSearchButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(810, 320, -1, -1)); repStatusSearchtxt.add("All"); repStatusSearchtxt.add("Min Level"); repStatusSearchtxt.add("Warehouse"); InventoryHistoryReport.add(repStatusSearchtxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 60, 150, -1)); InventoryHistoryReport.add(repIDSearchTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 60, 150, -1)); EnterYourSearchLabel3.setFont(new java.awt.Font("Calibri", 0, 16)); // NOI18N EnterYourSearchLabel3.setText("Enter your search"); InventoryHistoryReport.add(EnterYourSearchLabel3, 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); } }); InventoryHistoryReport.add(RefreshButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1000, 320, -1, -1)); background_green11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/background.png"))); // NOI18N InventoryHistoryReport.add(background_green11, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -10, 1250, 440)); reportTab.addTab("History", InventoryHistoryReport); javax.swing.GroupLayout jLayeredPane1Layout = new javax.swing.GroupLayout(jLayeredPane1); jLayeredPane1.setLayout(jLayeredPane1Layout); jLayeredPane1Layout.setHorizontalGroup( jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ordersTab, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(suppliersTab, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jLayeredPane1Layout.createSequentialGroup() .addComponent(inventoryTab, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addContainerGap())) .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jLayeredPane1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(reportTab, javax.swing.GroupLayout.PREFERRED_SIZE, 1240, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)))); jLayeredPane1Layout .setVerticalGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ordersTab, javax.swing.GroupLayout.PREFERRED_SIZE, 660, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(suppliersTab, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jLayeredPane1Layout.createSequentialGroup().addContainerGap() .addComponent(inventoryTab, javax.swing.GroupLayout.PREFERRED_SIZE, 495, 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(0, 0, Short.MAX_VALUE) .addComponent(reportTab, javax.swing.GroupLayout.PREFERRED_SIZE, 461, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)))); jLayeredPane1.setLayer(inventoryTab, javax.swing.JLayeredPane.DEFAULT_LAYER); jLayeredPane1.setLayer(ordersTab, javax.swing.JLayeredPane.DEFAULT_LAYER); jLayeredPane1.setLayer(suppliersTab, javax.swing.JLayeredPane.DEFAULT_LAYER); jLayeredPane1.setLayer(reportTab, javax.swing.JLayeredPane.DEFAULT_LAYER); getContentPane().add(jLayeredPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 230, 1240, 430)); 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)); 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)); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setIcon( new javax.swing.ImageIcon(getClass().getResource("/Images/ ? .png"))); // NOI18N jLabel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); jLabel2.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseMoved(java.awt.event.MouseEvent evt) { jLabel2MouseMoved(evt); } }); getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1280, 680)); pack(); setLocationRelativeTo(null); }// </editor-fold>//GEN-END:initComponents /** * @param evt * Closing program when 'X' icon is pressed */ private void jLabel4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel4MouseClicked System.exit(0); }//GEN-LAST:event_jLabel4MouseClicked /** * @param evt * Minimizing window when '-' icon is pressed */ private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel3MouseClicked this.setState(welcome1.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 ordersButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ordersButtonActionPerformed ordersTab.setVisible(true); inventoryTab.setVisible(false); reportTab.setVisible(false); suppliersTab.setVisible(false); updateChoice(); }//GEN-LAST:event_ordersButtonActionPerformed private void suppliersButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_suppliersButtonActionPerformed suppliersTab.setVisible(true); ordersTab.setVisible(false); inventoryTab.setVisible(false); reportTab.setVisible(false); }//GEN-LAST:event_suppliersButtonActionPerformed /** * Adding new order to DB * checking if fields are empty * @param evt */ private void addOrderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addOrderButtonActionPerformed int f = 0; int h = 0; sn = OrderIDText.getText(); int ans; try { String sql = "Insert into orders (orders_id,order_date,description,price,arrivel_date) values(?,?,?,?,?)"; pst = conn.prepareStatement(sql); pst.setString(1, OrderIDText.getText()); pst.setDate(2, new java.sql.Date(tooDate.getDate().getTime())); pst.setString(3, orderDesctxt.getText()); pst.setString(4, orderTptxt.getText()); pst.setDate(5, new java.sql.Date(toaDate.getDate().getTime())); if (OrderUploadText.getText().isEmpty()) { ans = JOptionPane.showConfirmDialog(null, "Are You Sure You Want To Add an Order Without a description ?", "Warning!", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); if (ans == 0) pst.execute(); if (ans == 1) { } } else { Path dest = Paths.get("src/OrderContracts/" + sn + ".pdf"); Path source = Paths.get(filename_order); Files.copy(source, dest, StandardCopyOption.REPLACE_EXISTING); pst.execute(); } JOptionPane.showMessageDialog(null, "Order Has Been Added"); } catch (Exception e) { h = 1; if (OrderIDText.getText().isEmpty()) { OrderIDText.setBackground(Color.red); f = 2; } else OrderIDText.setBackground(Color.white); if (orderDesctxt.getText().isEmpty()) { orderDesctxt.setBackground(Color.red); f = 2; } else orderDesctxt.setBackground(Color.white); if (orderTptxt.getText().isEmpty()) { orderTptxt.setBackground(Color.red); f = 2; } else orderTptxt.setBackground(Color.white); if (f == 2) { JOptionPane.showMessageDialog(null, "The Marked Fields Are Empty\n Please Fill All Fields", "Attension", JOptionPane.ERROR_MESSAGE); } else { JOptionPane.showMessageDialog(null, e); } } if (f == 0 && h == 0) { OrderIDText.setText(""); orderDesctxt.setText(""); orderTptxt.setText(""); tooDate.setCalendar(null); toaDate.setCalendar(null); OrderUploadText.setText(""); } }//GEN-LAST:event_addOrderButtonActionPerformed /** * Clears 'add order' fields * @param evt */ private void orderClearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_orderClearButtonActionPerformed OrderIDText.setText(""); orderDesctxt.setText(""); orderTptxt.setText(""); tooDate.setCalendar(null); toaDate.setCalendar(null); OrderUploadText.setText(""); }//GEN-LAST:event_orderClearButtonActionPerformed /** * Searching order in DB * @param evt */ private void searchOrderUpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchOrderUpButtonActionPerformed try { String sn = searchUpOrdertxt.getText(); String sql = "select orders_id as 'Order ID',order_date as 'Order Date',description as 'Description',price as 'Total Price',arrivel_date as 'Arrivel Date' from orders where orders_id='" + sn + "'"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); orderUpdateTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } }//GEN-LAST:event_searchOrderUpButtonActionPerformed /** * Updating order details in DB * @param evt */ private void orderUpdateTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_orderUpdateTableMouseClicked try { int raw = orderUpdateTable.getSelectedRow(); tableClick = (orderUpdateTable.getModel().getValueAt(raw, 0).toString()); String sql = "select orders_id,order_date,description,price,arrivel_date from orders where orders_id ='" + tableClick + "' "; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); if (rs.next()) { String add1 = rs.getString("description"); orderDescUptxt.setText(add1); String add2 = rs.getString("price"); tpUptxt.setText(add2); Date add3 = rs.getDate("arrivel_date"); toaDate.setDate(add3); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } }//GEN-LAST:event_orderUpdateTableMouseClicked private void refreshUpdateOrderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshUpdateOrderButtonActionPerformed update_OrderTable(); }//GEN-LAST:event_refreshUpdateOrderButtonActionPerformed private void orderUpdateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_orderUpdateButtonActionPerformed try { String vs = orderDescUptxt.getText(); String vq = tpUptxt.getText(); Date vd = new java.sql.Date(toaUpdate.getDate().getTime()); String sql = "update orers set description='" + vs + "',price='" + vq + "',arrivel_date='" + vd + "' where order_id='" + tableClick + "'"; pst = conn.prepareStatement(sql); pst.execute(); JOptionPane.showMessageDialog(null, "Order Updated"); update_OrderTable(); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } update_OrderTable(); }//GEN-LAST:event_orderUpdateButtonActionPerformed private void UpdateOrderPanelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_UpdateOrderPanelMouseClicked }//GEN-LAST:event_UpdateOrderPanelMouseClicked private void searchPLButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchPLButtonActionPerformed try { String sn = itemIDPricetxt.getText(); String sql = "select item_id as 'Item ID',item_price as 'Item Price',supplier_id as 'Supplier ID',supplier_name as 'Supplier Name' from item_from_supplier where item_id='" + sn + "' order by item_price"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); priceListTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } }//GEN-LAST:event_searchPLButtonActionPerformed private void refreshPLButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshPLButtonActionPerformed price_list_table(); }//GEN-LAST:event_refreshPLButtonActionPerformed /** * Adding new price from supplier to DB * @param evt */ private void addPLButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addPLButtonActionPerformed int f = 0; int h = 0; try { String sql = "Insert into item_from_supplier (item_id,item_price,supplier_id,supplier_name) values(?,?,?,?)"; pst = conn.prepareStatement(sql); pst.setString(1, itemIdPLtxt.getText()); pst.setString(2, pricePLtxt.getText()); pst.setString(3, supplierIdPLtxt.getText()); pst.setString(4, supplierNamePLtxt.getText()); pst.executeQuery(); JOptionPane.showMessageDialog(null, "Supplier Price Added"); } catch (Exception e) { h = 1; if (itemIdPLtxt.getText().isEmpty()) itemIdPLtxt.setBackground(Color.red); else itemIdPLtxt.setBackground(Color.white); if (pricePLtxt.getText().isEmpty()) pricePLtxt.setBackground(Color.red); else pricePLtxt.setBackground(Color.white); if (supplierIdPLtxt.getText().isEmpty()) supplierIdPLtxt.setBackground(Color.red); else supplierIdPLtxt.setBackground(Color.white); if (supplierNamePLtxt.getText().isEmpty()) supplierNamePLtxt.setBackground(Color.red); else supplierNamePLtxt.setBackground(Color.white); if (f != 2) { JOptionPane.showMessageDialog(null, "The Marked Fields Are Empty\n Please Fill All Fields", "Attension", JOptionPane.ERROR_MESSAGE); } else { JOptionPane.showMessageDialog(null, e); } } if (f == 0 && h == 0) { itemIdPLtxt.setText(""); pricePLtxt.setText(""); supplierIdPLtxt.setText(""); supplierNamePLtxt.setText(""); } }//GEN-LAST:event_addPLButtonActionPerformed private void searchOrdertxtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchOrdertxtActionPerformed // TODO add your handling code here: }//GEN-LAST:event_searchOrdertxtActionPerformed private void searchOrderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchOrderButtonActionPerformed try { String sn = searchOrdertxt.getText(); String sql = "select orders_id as 'Order ID',order_date as 'Order Date',description as 'Description',price as 'Total Price',arrivel_date as 'Arrivel Date' from orders where orders_id='" + sn + "'"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); orderSearchTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } // update_OrderTable(); }//GEN-LAST:event_searchOrderButtonActionPerformed private void orderSearchTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_orderSearchTableMouseClicked // TODO add your handling code here: }//GEN-LAST:event_orderSearchTableMouseClicked private void orderRefreshButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_orderRefreshButtonActionPerformed update_Search_OrderTable(); }//GEN-LAST:event_orderRefreshButtonActionPerformed private void ordersTabMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ordersTabMouseClicked update_OrderTable(); update_Search_OrderTable(); price_list_table(); }//GEN-LAST:event_ordersTabMouseClicked 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); f = 2; } else SupplierIDText.setBackground(Color.white); if (SupplierNameText.getText().isEmpty()) { SupplierNameText.setBackground(Color.red); f = 2; } else SupplierNameText.setBackground(Color.white); if (SupplierAddressText.getText().isEmpty()) { SupplierAddressText.setBackground(Color.red); f = 2; } else SupplierAddressText.setBackground(Color.white); if (SupplierPhoneText.getText().isEmpty()) { SupplierPhoneText.setBackground(Color.red); f = 2; } else SupplierPhoneText.setBackground(Color.white); if (SupplierEmailText.getText().isEmpty()) { SupplierEmailText.setBackground(Color.red); f = 2; } else SupplierEmailText.setBackground(Color.white); if (SupplierContracdIDText.getText().isEmpty()) { SupplierContracdIDText.setBackground(Color.red); f = 2; } else SupplierContracdIDText.setBackground(Color.white); if (f == 2) { JOptionPane.showMessageDialog(null, "The Marked Fields Are Empty\n Please Fill All Fields", "Attension", 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 'Supplier Address',supplier_phone as 'Phone No',supplier_email as 'Email',supplier_contract_id as 'Contract ID' 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 'Supplier Address',supplier_phone as 'Phone No',supplier_email as 'Email',supplier_contract_id as 'Contract ID' 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("src/SupplierContracts/" + 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 ?", "Warning!", 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 'Supplier Address',supplier_phone as 'Phone No',supplier_email as 'Email',supplier_contract_id as 'Contract ID' 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 'Supplier Address',supplier_phone as 'Phone No',supplier_email as 'Email',supplier_contract_id as 'Contract ID' 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 supplier_filename_show_contract = "/src/SupplierContracts/" + SupplierContractIDText2.getText() + ".pdf"; 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 supplier_filename_show_contract = "src/SupplierContracts/" + add1 + ".pdf"; Desktop.getDesktop().open(new File(supplier_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 nameTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nameTextActionPerformed // TODO add your handling code here: }//GEN-LAST:event_nameTextActionPerformed private void quantityTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quantityTextActionPerformed // TODO add your handling code here: }//GEN-LAST:event_quantityTextActionPerformed private void supplierTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_supplierTextActionPerformed // TODO add your handling code here: }//GEN-LAST:event_supplierTextActionPerformed private void categoryChoiceMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_categoryChoiceMouseClicked }//GEN-LAST:event_categoryChoiceMouseClicked /** * Adds new Item To DB * Checks if There are any empty fields * @param evt */ private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed int f = 0; int h = 0; String q, mq; int q1, mq1; try { String sql = "Insert into items (item_id,item_name,expiration_date,category_id,supplier_name,quantity,description,min_quantity_level,warehouse,row,shelf,comments) values(?,?,?,?,?,?,?,?,?,?,?,?)"; pst = conn.prepareStatement(sql); pst.setString(1, serialText.getText()); pst.setString(2, nameText.getText()); pst.setDate(3, new java.sql.Date(eDate.getDate().getTime())); pst.setString(4, supplierText.getText()); pst.setString(5, quantityText.getText()); pst.setInt(6, categoryChoice.getSelectedIndex()); pst.setString(7, descriptionText.getText()); pst.setString(8, minLevelText.getText()); pst.setString(9, Warehouse_Text.getText()); pst.setString(10, Row_Text.getText()); pst.setString(11, Shelf_Text.getText()); pst.setString(12, Comments_Text.getText()); q = quantityText.getText(); mq = minLevelText.getText(); q1 = Integer.parseInt(q); mq1 = Integer.parseInt(mq); if (mq1 > q1) { f = 2; throw new Exception("Min Quantity Level Is Higher Then Quantity Level"); } pst.executeQuery(); JOptionPane.showMessageDialog(null, "Item Added"); } catch (Exception e) { h = 1; if (serialText.getText().isEmpty()) serialText.setBackground(Color.red); else serialText.setBackground(Color.white); if (nameText.getText().isEmpty()) nameText.setBackground(Color.red); else nameText.setBackground(Color.white); if (categoryChoice.getSelectedItem().isEmpty()) categoryChoice.setBackground(Color.red); else categoryChoice.setBackground(Color.white); if (supplierText.getText().isEmpty()) supplierText.setBackground(Color.red); else supplierText.setBackground(Color.white); if (quantityText.getText().isEmpty()) quantityText.setBackground(Color.red); else quantityText.setBackground(Color.white); if (descriptionText.getText().isEmpty()) descriptionText.setBackground(Color.red); else descriptionText.setBackground(Color.white); if (minLevelText.getText().isEmpty()) minLevelText.setBackground(Color.red); else minLevelText.setBackground(Color.white); if (Comments_Text.getText().isEmpty()) Comments_Text.setBackground(Color.red); else Comments_Text.setBackground(Color.white); if (Warehouse_Text.getText().isEmpty()) Warehouse_Text.setBackground(Color.red); else Warehouse_Text.setBackground(Color.white); if (Row_Text.getText().isEmpty()) Row_Text.setBackground(Color.red); else Row_Text.setBackground(Color.white); if (Shelf_Text.getText().isEmpty()) Shelf_Text.setBackground(Color.red); else Shelf_Text.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, "Attension", JOptionPane.ERROR_MESSAGE); } } if (f == 0 && h == 0) { serialText.setText(""); nameText.setText(""); supplierText.setText(""); quantityText.setText(""); descriptionText.setText(""); minLevelText.setText(""); Warehouse_Text.setText(""); Row_Text.setText(""); Shelf_Text.setText(""); Comments_Text.setText(""); eDate.setCalendar(null); } //f=0; }//GEN-LAST:event_addButtonActionPerformed private void clearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearButtonActionPerformed serialText.setText(""); nameText.setText(""); supplierText.setText(""); quantityText.setText(""); descriptionText.setText(""); minLevelText.setText(""); Warehouse_Text.setText(""); Row_Text.setText(""); Shelf_Text.setText(""); Comments_Text.setText(""); eDate.setCalendar(null); }//GEN-LAST:event_clearButtonActionPerformed private void Shelf_TextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Shelf_TextActionPerformed // TODO add your handling code here: }//GEN-LAST:event_Shelf_TextActionPerformed private void Row_TextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Row_TextActionPerformed // TODO add your handling code here: }//GEN-LAST:event_Row_TextActionPerformed private void Warehouse_TextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Warehouse_TextActionPerformed // TODO add your handling code here: }//GEN-LAST:event_Warehouse_TextActionPerformed /** * Displaying the details from the clicked table in the text fields * @param evt */ private void itemTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_itemTableMouseClicked try { int raw = itemTable.getSelectedRow(); tableClick = (itemTable.getModel().getValueAt(raw, 0).toString()); /** getting the item ID*/ String sql = "select item_id,item_name,expiration_date,supplier_name,quantity,description,min_quantity_level,warehouse,row,shelf from items where item_id='" + tableClick + "' "; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); if (rs.next()) { iid = rs.getString("item_id"); String add1 = rs.getString("quantity"); quantitytxt.setText(add1); oq = quantitytxt.getText(); String add2 = rs.getString("min_quantity_level"); minQtxt.setText(add2); String add3 = rs.getString("description"); descriptiontxt.setText(add3); String add4 = rs.getString("supplier_name"); suppliertxt.setText(add4); String add5 = rs.getString("warehouse"); wherhoustxt1.setText(add5); String add6 = rs.getString("row"); rawtxt1.setText(add6); String add7 = rs.getString("shelf"); shelftxt1.setText(add7); Date add8 = rs.getDate("expiration_date"); datetxt.setDate(add8); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } }//GEN-LAST:event_itemTableMouseClicked private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed if (searchmethod.equals("item_id")) { try { String sn = searchtxt.getText(); String sql = "select item_id as 'Item ID',item_name as 'Item Name',expiration_date as 'Experation Date',supplier_name as 'Supplier Name',quantity as 'Quantity',description as 'Description',min_quantity_level as 'Min Quantity Level',warehouse as 'Warehouse',row as 'Row',shelf as 'Shelf' from items where item_id='" + sn + "' "; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); itemTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } else { try { String sn = searchtxt.getText(); String sql = "select item_id as 'Item ID',item_name as 'Item Name',expiration_date as 'Experation Date',supplier_name as 'Supplier Name',quantity as 'Quantity',description as 'Description',min_quantity_level as 'Min Quantity Level',warehouse as 'Warehouse',row as 'Row',shelf as 'Shelf' from items where item_name='" + sn + "' "; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); itemTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } }//GEN-LAST:event_searchButtonActionPerformed private void updateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_updateButtonActionPerformed try { String vs = suppliertxt.getText(); // String vq = quantitytxt.getText(); Date vd = new java.sql.Date(datetxt.getDate().getTime()); String vm = minQtxt.getText(); String vds = descriptiontxt.getText(); String vw = wherhoustxt1.getText(); String vr = rawtxt1.getText(); String vsl = shelftxt1.getText(); /* if(vd.isEmpty()) { vd="Select expiration_date from items where item_id='" + tableClick+"' "; }*/ String sql = "update items set supplier_name='" + vs + "',expiration_date='" + vd + "',min_quantity_level='" + vm + "',description='" + vds + "',warehouse='" + vw + "',row='" + vr + "',shelf='" + vsl + "' where item_id='" + tableClick + "'"; pst = conn.prepareStatement(sql); pst.execute(); JOptionPane.showMessageDialog(null, "Item Updated"); update_table(); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } }//GEN-LAST:event_updateButtonActionPerformed private void itemNameRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemNameRadioButtonActionPerformed searchmethod = "item_name"; }//GEN-LAST:event_itemNameRadioButtonActionPerformed private void itemIdRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemIdRadioButtonActionPerformed searchmethod = "item_id"; }//GEN-LAST:event_itemIdRadioButtonActionPerformed private void RefreshButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RefreshButtonActionPerformed update_table(); }//GEN-LAST:event_RefreshButtonActionPerformed private void submitQButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_submitQButtonActionPerformed int checkRequest = 0; try { String sql = "select item_id from quantity_change"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); while (rs.next()) { if (tableClick == rs.getString("item_id")) checkRequest = 1; } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } if (checkRequest == 0) { try { String sql = "update users set flag=1 where user_type=3"; pst = conn.prepareStatement(sql); pst.execute(); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } try { String sql = "Insert into quantity_change (item_id,user_name,old_quantity,new_quantity,comments) values(?,?,?,?,?)"; pst = conn.prepareStatement(sql); pst.setString(1, iid); pst.setString(2, loginGUI.username); pst.setString(3, oq); pst.setString(4, quantitytxt.getText()); pst.setString(5, commentQtxt.getText()); pst.execute(); JOptionPane.showMessageDialog(null, "Request Has Been Sent"); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } try { String sql = "update items set qchanges=1 where item_id='" + iid + "'"; pst = conn.prepareStatement(sql); pst.execute(); quantityChangesReqButton.setEnabled(true); this.validate(); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } else JOptionPane.showMessageDialog(null, "A Request has already been made for this item", "Attension", JOptionPane.ERROR_MESSAGE); }//GEN-LAST:event_submitQButtonActionPerformed private void deleteItemButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteItemButtonActionPerformed int ans = JOptionPane.showConfirmDialog(null, "Are You Sure You Want To Delete This Item", "Warning!", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); if (ans == 0) { int raw = itemTable.getSelectedRow(); tableClick = (itemTable.getModel().getValueAt(raw, 0).toString()); String sql = "delete from items where item_id='" + tableClick + "'"; try { pst = conn.prepareStatement(sql); pst.execute(); //JOptionPane.showMessageDialog(null, "Item Deleted!"); update_table(); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } String qsql = "delete from quantity where item_id='" + tableClick + "'"; try { pst = conn.prepareStatement(qsql); pst.execute(); JOptionPane.showMessageDialog(null, "Item Deleted!"); update_table(); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } if (ans == 1) { } }//GEN-LAST:event_deleteItemButtonActionPerformed private void searchStatusButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchStatusButtonActionPerformed try { String sn = searchStatustxt.getText(); String sql = "select item_id as 'Item ID',item_name as 'Item Name',worker_id as 'Worker ID',date as 'Date',amount_for_operation as 'Amount Of Operation',quantity_trace 'Quantity Trace',operation_type as 'Operation Type' from quantity where item_id='" + sn + "'"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); statusTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } }//GEN-LAST:event_searchStatusButtonActionPerformed private void addStatusButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addStatusButtonActionPerformed int f = 0; int h = 0; String ot, iid, afo, ssum = null, opnum; int q1, mq1, sum = 0, ml, on; try { iid = sItemIdtxt.getText(); String sql = "select quantity,min_quantity_level from items where item_id='" + iid + "'"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); rs.next(); String add1 = rs.getString("quantity"); String add2 = rs.getString("min_quantity_level"); sql = "SELECT opnum FROM quantity ORDER BY opnum DESC LIMIT 1"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); rs.next(); opnum = rs.getString("opnum"); on = Integer.parseInt(opnum); on++; opnum = Integer.toString(on); afo = amountFor.getText(); ot = oporationType.getSelectedItem(); if (ot.equals("Add")) { q1 = Integer.parseInt(add1); mq1 = Integer.parseInt(afo); sum = q1 + mq1; ssum = Integer.toString(sum); f = 0; sql = "update items set quantity='" + ssum + "'where item_id='" + iid + "'"; pst = conn.prepareStatement(sql); pst.execute(); } if (ot.equals("Subtract")) { ml = Integer.parseInt(add2); q1 = Integer.parseInt(add1); mq1 = Integer.parseInt(afo); sum = q1 - mq1; if (sum < ml) JOptionPane.showMessageDialog(null, "The Current Quantity Is Lower Than The Min Level", "Warning", JOptionPane.ERROR_MESSAGE); ssum = Integer.toString(sum); f = 0; sql = "update items set quantity='" + ssum + "'where item_id='" + iid + "'"; pst = conn.prepareStatement(sql); pst.execute(); } JOptionPane.showMessageDialog(null, "Operation Added"); sql = "Insert into quantity (opnum,item_id,worker_id,date,operation_type,amount_for_operation,quantity_trace) values(?,?,?,?,?,?,?)"; pst = conn.prepareStatement(sql); pst.setString(1, opnum); pst.setString(2, sItemIdtxt.getText()); pst.setString(3, sWorkerIdtxt.getText()); pst.setDate(4, new java.sql.Date(dateStatus.getDate().getTime())); pst.setString(6, amountFor.getText()); pst.setString(5, oporationType.getSelectedItem()); pst.setString(7, ssum); pst.executeUpdate(); /*if (mq1 > q1) { f = 2; throw new Exception("Min Quantity Level Is Higher Then Quantity Level"); }*/ } catch (Exception e) { h = 1; if (sItemIdtxt.getText().isEmpty()) { f = 2; sItemIdtxt.setBackground(Color.red); } else sItemIdtxt.setBackground(Color.white); if (sWorkerIdtxt.getText().isEmpty()) { f = 2; sWorkerIdtxt.setBackground(Color.red); } else sWorkerIdtxt.setBackground(Color.white); if (oporationType.getSelectedItem().isEmpty()) { f = 2; oporationType.setBackground(Color.red); } else oporationType.setBackground(Color.white); if (amountFor.getText().isEmpty()) { f = 2; amountFor.setBackground(Color.red); } else amountFor.setBackground(Color.white); String s = ((JTextField) dateStatus.getDateEditor().getUiComponent()).getText(); if (s.isEmpty()) { f = 2; dateStatus.setBackground(Color.red); } else dateStatus.setBackground(Color.white); //JOptionPane.showMessageDialog(null, e); 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) { sItemIdtxt.setText(""); sWorkerIdtxt.setText(""); amountFor.setText(""); dateStatus.setCalendar(null); } update_statusTable(); checkMinQLvl(); this.validate(); }//GEN-LAST:event_addStatusButtonActionPerformed private void refreshStausButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshStausButtonActionPerformed update_statusTable(); }//GEN-LAST:event_refreshStausButtonActionPerformed private void itemSearchTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_itemSearchTableMouseClicked // TODO add your handling code here: }//GEN-LAST:event_itemSearchTableMouseClicked private void searchButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButton1ActionPerformed if (searchmethod.equals("item_id")) { try { String sn = searchtxt1.getText(); String sql = "select item_id as 'Item ID',item_name as 'Item Name',expiration_date as 'Experation Date',supplier_name as 'Supplier Name',quantity as 'Quantity',description as 'Description',min_quantity_level as 'Min Quantity Level',warehouse as 'Warehouse',row as 'Row',shelf as 'Shelf' from items where item_id='" + sn + "' "; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); itemSearchTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } else { try { String sn = searchtxt1.getText(); String sql = "select item_id as 'Item ID',item_name as 'Item Name',expiration_date as 'Experation Date',supplier_name as 'Supplier Name',quantity as 'Quantity',description as 'Description',min_quantity_level as 'Min Quantity Level',warehouse as 'Warehouse',row as 'Row',shelf as 'Shelf' from items where item_name='" + sn + "' "; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); itemSearchTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } }//GEN-LAST:event_searchButton1ActionPerformed private void itemIdRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemIdRadioButton1ActionPerformed searchmethod = "item_id"; }//GEN-LAST:event_itemIdRadioButton1ActionPerformed private void itemNameRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemNameRadioButton1ActionPerformed searchmethod = "item_name"; }//GEN-LAST:event_itemNameRadioButton1ActionPerformed private void RefreshButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RefreshButton1ActionPerformed update_Search_table(); }//GEN-LAST:event_RefreshButton1ActionPerformed private void inventoryTabMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_inventoryTabMouseClicked update_table(); update_Search_table(); update_statusTable(); }//GEN-LAST:event_inventoryTabMouseClicked private void quantityChangesReqButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quantityChangesReqButtonActionPerformed quantityRequest qr = new quantityRequest(); qr.pack(); qr.setLocationRelativeTo(null); qr.setVisible(true); }//GEN-LAST:event_quantityChangesReqButtonActionPerformed private void MinLevelWarningButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MinLevelWarningButtonActionPerformed minLevelWarnings mlw = new minLevelWarnings(); mlw.pack(); mlw.setLocationRelativeTo(null); mlw.setVisible(true); }//GEN-LAST:event_MinLevelWarningButtonActionPerformed private void OrderIDTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OrderIDTextActionPerformed // TODO add your handling code here: }//GEN-LAST:event_OrderIDTextActionPerformed private void OrderUploadTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OrderUploadTextActionPerformed // TODO add your handling code here: }//GEN-LAST:event_OrderUploadTextActionPerformed private void OrderUploadContractButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OrderUploadContractButtonActionPerformed 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_order = f.getAbsolutePath(); OrderUploadText.setText(filename_order); f.getAbsoluteFile(); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } }//GEN-LAST:event_OrderUploadContractButtonActionPerformed private void OrderShowContractButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_OrderShowContractButtonActionPerformed try { Desktop.getDesktop().open(new File(filename_order)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } }//GEN-LAST:event_OrderShowContractButtonActionPerformed 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 dropManageUserLabelMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_dropManageUserLabelMouseMoved changePasswordLabel.setBorder(null); }//GEN-LAST:event_dropManageUserLabelMouseMoved private void jLabel2MouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel2MouseMoved changePasswordLabel.setBorder(null); jLabel3.setBorder(null); }//GEN-LAST:event_jLabel2MouseMoved 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 wareHousRepRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_wareHousRepRadioButtonActionPerformed wareHouschoice.setVisible(true); itemRepChoice = "Warehouse"; this.validate(); }//GEN-LAST:event_wareHousRepRadioButtonActionPerformed private void allItemRepRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allItemRepRadioButtonActionPerformed itemRepChoice = "All"; wareHouschoice.setVisible(false); this.validate(); }//GEN-LAST:event_allItemRepRadioButtonActionPerformed private void minLevelRepRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_minLevelRepRadioButtonActionPerformed itemRepChoice = "Min Level"; wareHouschoice.setVisible(false); this.validate(); }//GEN-LAST:event_minLevelRepRadioButtonActionPerformed private void genrateItemRepButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_genrateItemRepButtonActionPerformed 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 com.itextpdf.text.Font bfBold12 = new com.itextpdf.text.Font(FontFamily.TIMES_ROMAN, 12, com.itextpdf.text.Font.BOLD, new BaseColor(0, 0, 0)); com.itextpdf.text.Font bf12 = new com.itextpdf.text.Font(FontFamily.TIMES_ROMAN, 12); //file path String dt = dateFormat.format(date); sFileName = "Report No- " + repID + " Items Report- " + dt + " Status " + itemRepChoice + " .pdf"; String path = "src/ItemsReports/" + 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 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 " + itemRepChoice + " Items"); image.setAlignment(Image.RIGHT); doc.add(image); //specify column widths float[] columnWidths = { 2f, 2f, 2f, 3f, 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, "Item ID", Element.ALIGN_CENTER, 1, bfBold12); insertCell(table, "Item Name", Element.ALIGN_CENTER, 1, bfBold12); insertCell(table, "Quantity", Element.ALIGN_CENTER, 1, bfBold12); insertCell(table, "Min Quantity Level", Element.ALIGN_CENTER, 1, bfBold12); insertCell(table, "Warehouse", Element.ALIGN_CENTER, 1, bfBold12); insertCell(table, "Row", Element.ALIGN_CENTER, 1, bfBold12); insertCell(table, "Shelf", 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, add6, add7; if (itemRepChoice.equals("All")) { try { String sql = "select item_id,item_name,quantity,min_quantity_level,warehouse,row,shelf from items"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); while (rs.next()) { add1 = rs.getString("item_id"); add2 = rs.getString("item_name"); add3 = rs.getString("quantity"); add4 = rs.getString("min_quantity_level"); add5 = rs.getString("warehouse"); add6 = rs.getString("row"); add7 = rs.getString("shelf"); 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); insertCell(table, add6, Element.ALIGN_CENTER, 1, bf12); insertCell(table, add7, Element.ALIGN_CENTER, 1, bf12); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } else if (itemRepChoice.equals("Warehouse")) { String wh = wareHouschoice.getSelectedItem(); try { String sql = "select item_id,item_name,quantity,min_quantity_level,warehouse,row,shelf from items where warehouse='" + wh + "'"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); while (rs.next()) { add1 = rs.getString("item_id"); add2 = rs.getString("item_name"); add3 = rs.getString("quantity"); add4 = rs.getString("min_quantity_level"); add5 = rs.getString("warehouse"); add6 = rs.getString("row"); add7 = rs.getString("shelf"); 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); insertCell(table, add6, Element.ALIGN_CENTER, 1, bf12); insertCell(table, add7, Element.ALIGN_CENTER, 1, bf12); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } else if (itemRepChoice.equals("Min Level")) { String wh = wareHouschoice.getSelectedItem(); try { String sql = "select item_id,item_name,quantity,min_quantity_level,warehouse,row,shelf from items where min_quantity_level>=quantity"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); while (rs.next()) { add1 = rs.getString("item_id"); add2 = rs.getString("item_name"); add3 = rs.getString("quantity"); add4 = rs.getString("min_quantity_level"); add5 = rs.getString("warehouse"); add6 = rs.getString("row"); add7 = rs.getString("shelf"); 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); insertCell(table, add6, Element.ALIGN_CENTER, 1, bf12); insertCell(table, add7, 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("\nItems 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(itemRepChoice, date, repID); }//GEN-LAST:event_genrateItemRepButtonActionPerformed private void showInventoryRepButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showInventoryRepButtonActionPerformed String filename_show_report = "src/ItemsReports/" + sFileName; try { Desktop.getDesktop().open(new File(filename_show_report)); } catch (Exception e) { JOptionPane.showMessageDialog(null, "The Report Generetad Wasn't Found", "Attention", JOptionPane.ERROR_MESSAGE); } }//GEN-LAST:event_showInventoryRepButtonActionPerformed private void searchRepDateRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchRepDateRadioButtonActionPerformed searchmethod = "Date"; repStatusSearchtxt.setVisible(false); repStatusSearchtxt.setEnabled(false); repDateSearchtxt.setVisible(true); repDateSearchtxt.setEnabled(true); repIDSearchTxt.setVisible(false); repIDSearchTxt.setEnabled(false); this.validate(); }//GEN-LAST:event_searchRepDateRadioButtonActionPerformed private void searchRepStatRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchRepStatRadioButtonActionPerformed searchmethod = "Stat"; repStatusSearchtxt.setVisible(true); repStatusSearchtxt.setEnabled(true); repDateSearchtxt.setVisible(false); repDateSearchtxt.setEnabled(false); repIDSearchTxt.setVisible(false); repIDSearchTxt.setEnabled(false); this.validate(); }//GEN-LAST:event_searchRepStatRadioButtonActionPerformed private void searchRepIDRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchRepIDRadioButtonActionPerformed searchmethod = "ID"; repDateSearchtxt.setVisible(false); repDateSearchtxt.setEnabled(false); repStatusSearchtxt.setVisible(false); repStatusSearchtxt.setEnabled(false); repIDSearchTxt.setVisible(true); repIDSearchTxt.setEnabled(true); this.validate(); }//GEN-LAST:event_searchRepIDRadioButtonActionPerformed 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 + "' "; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); items_rep_Search_Table.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } else if (searchmethod.equals("Stat")) { try { String sn = repStatusSearchtxt.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 reportStatus='" + sn + "' "; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); items_rep_Search_Table.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 report_create_date='" + sd + "' by report_create_date"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); items_rep_Search_Table.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } }//GEN-LAST:event_repSearchButtonActionPerformed 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 reportTabMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_reportTabMouseClicked update_rep_Search_Table(); }//GEN-LAST:event_reportTabMouseClicked 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 Show_Contract_ButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Show_Contract_ButtonActionPerformed try { int raw = orderSearchTable.getSelectedRow(); tableClick = (orderSearchTable.getModel().getValueAt(raw, 0).toString()); String sql = "select orders_id,order_date,description,price,arrivel_date from orders where orders_id ='" + tableClick + "' "; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); if (rs.next()) { String add1 = rs.getString("orders_id"); String order_filename_show_contract = "src/OrderContracts/" + add1 + ".pdf"; Desktop.getDesktop().open(new File(order_filename_show_contract)); } } catch (Exception e) { JOptionPane.showMessageDialog(null, "There Is No Order Aveilable", "Attention", JOptionPane.WARNING_MESSAGE); } }//GEN-LAST:event_Show_Contract_ButtonActionPerformed private void inventoryButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inventoryButtonActionPerformed inventoryTab.setVisible(true); reportTab.setVisible(false); suppliersTab.setVisible(false); ordersTab.setVisible(false); }//GEN-LAST:event_inventoryButtonActionPerformed private void reportsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_reportsButtonActionPerformed reportTab.setVisible(true); ordersTab.setVisible(false); inventoryTab.setVisible(false); suppliersTab.setVisible(false); }//GEN-LAST:event_reportsButtonActionPerformed private void RefreshButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RefreshButton2ActionPerformed update_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(welcome1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(welcome1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(welcome1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(welcome1.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 welcome1().setVisible(true); } }); } /** * Retrieves the information from the DB and Display it in the jTable component */ private void update_table() { try { String sql = "select item_id as 'Item ID',item_name as 'Item Name',expiration_date 'Expiration Date',supplier_name as 'Supplier Name',quantity as 'Quantity',description as'Description',min_quantity_level as 'Min Quantity Level',warehouse as 'Warehouse',row as 'Row',shelf as 'Shelf' from items"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); itemTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } private void update_Search_table() { try { String sql = "select item_id as 'Item ID',item_name as 'Item Name',expiration_date 'Expiration Date',supplier_name as 'Supplier Name',quantity as 'Quantity',description as'Description',min_quantity_level as 'Min Quantity Level',warehouse as 'Warehouse',row as 'Row',shelf as 'Shelf' from items"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); itemSearchTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } private void update_statusTable() { try { String sql = "select item_id as 'Item ID',item_name as 'Item Name',worker_id as 'Worker ID',date as 'Date',amount_for_operation as 'Amount For Operation',quantity_trace as 'Quantity Trace',operation_type as 'Operation Type' from quantity ORDER BY date DEC"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); statusTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } private void update_OrderTable() { try { String sql = "select orders_id as 'Order ID',order_date as 'Order Date',description as 'Description',price as 'Total Price',arrivel_date as 'Arrivel Date' from orders"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); orderUpdateTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } private void update_Search_OrderTable() { try { String sql = "select orders_id as 'Order ID',order_date as 'Order Date',description as 'Description',price as 'Total Price',arrivel_date as 'Arrivel Date' from orders"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); orderSearchTable.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 price_list_table() { try { String sql = "select item_id as 'Item ID',item_price as 'Item Price',supplier_id as 'Supplier ID',supplier_name as 'Supplier Name' from item_from_supplier"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); priceListTable.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } /** * Checks if there is a quantity change request in the DB */ private void checkQReqTable() { String un = loginGUI.username; try { String sql = "select * from quantity_change where user_name='" + un + "'"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); if (rs.next()) quantityChangesReqButton.setEnabled(true); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } /** * Checks if there are items that their quantity is lower then the minimum level allowed * if there is, it updates the DB */ private void checkMinQLvl() { int q, mql; try { String sql = "select * from items"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); while (rs.next()) { q = rs.getInt("quantity"); mql = rs.getInt("min_quantity_level"); if (mql >= q) { MinLevelWarningButton.setEnabled(true); minLvlWarIcon.setVisible(true); return; } MinLevelWarningButton.setEnabled(false); minLvlWarIcon.setVisible(false); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } /** * Retrieve All the suppliers names from DB */ private void updateChoice() { try { suppNamechoice.removeAll(); String sn; String sql = "select distinct supplier_name from suppliers"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); while (rs.next()) { sn = rs.getString("supplier_name"); suppNamechoice.addItem(sn); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } /** * insert single cells to the PDF file ad fills them with text * @param table * @param text * @param align * @param colspan * @param font */ 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); } /** * Saves the report information to the DB * @param s * @param date * @param pi */ 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, null); pst.setDate(4, null); pst.setString(5, s); pst.setString(6, sFileName); pst.setString(7, "Items"); pst.execute(); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } private void update_rep_Search_Table() { try { String sql = "select report_no as 'Report ID',report_create_date as 'Creation Date',repStatus as 'Items Status' from reports where reportCategory='Items' ORDER by report_create_date"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(sql); items_rep_Search_Table.setModel(DbUtils.resultSetToTableModel(rs)); } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } } public void setButtonEnable() { quantityChangesReqButton.setEnabled(false); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel AddItemPanel; private javax.swing.JPanel AddOrderPanel; private javax.swing.JPanel AddSupplierPanel; private javax.swing.JButton ClearButton; private javax.swing.JLabel Comments_Label; private javax.swing.JTextArea Comments_Text; private javax.swing.JPanel ContractPanel; private javax.swing.JLabel DescriptionLabel; private javax.swing.JLabel EnterYourSearchLabel; private javax.swing.JLabel EnterYourSearchLabel1; private javax.swing.JLabel EnterYourSearchLabel11; private javax.swing.JLabel EnterYourSearchLabel2; private javax.swing.JLabel EnterYourSearchLabel3; private javax.swing.JLabel EnterYourSearchLabel5; private javax.swing.JLabel EnterYourSearchLabel6; private javax.swing.JLabel EnterYourSearchLabel7; private javax.swing.JLabel EnterYourSearchLabel8; private javax.swing.JLabel ExpirationDateLabel2; private javax.swing.JPanel InventoryHistoryReport; private javax.swing.JPanel InventoryReport; private javax.swing.JButton MinLevelWarningButton; private javax.swing.JLabel MinQuantityLabel1; private javax.swing.JLabel OrderContractLabel; private javax.swing.JLabel OrderIDLabel; private javax.swing.JTextField OrderIDText; private javax.swing.JButton OrderShowContractButton; private javax.swing.JButton OrderUploadContractButton; private javax.swing.JTextField OrderUploadText; private javax.swing.JPanel PriceListPanel; private javax.swing.JLabel QuantityLabel1; private javax.swing.JLabel QuantityLabel2; private javax.swing.JButton RefreshButton; private javax.swing.JButton RefreshButton1; private javax.swing.JButton RefreshButton2; private javax.swing.JTextField Row_Text; private javax.swing.JLabel Row_label; private javax.swing.JLabel Row_label1; private javax.swing.JLabel Row_label2; private javax.swing.JPanel SearchItemPanel; private javax.swing.JPanel SearchOrderPanel; private javax.swing.JPanel SearchSupplierPanel; private javax.swing.JTextField Shelf_Text; private javax.swing.JLabel Shelf__label; private javax.swing.JLabel Shelf__label1; private javax.swing.JLabel Shelf__label2; private javax.swing.JButton Show_Contract_Button; private javax.swing.JPanel StatusItemPanel; private javax.swing.JLabel Storage_Label; private javax.swing.JLabel Storage_Label1; private javax.swing.JLabel Storage_Label2; private javax.swing.JLabel Storage_Label4; private javax.swing.JPanel Storage_panel; private javax.swing.JPanel Storage_panel1; private javax.swing.JPanel Storage_panel2; 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.JPanel SupplierContractPanel1; 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.JLabel SupplierNameLabel2; 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.JLabel UpdateDescriptionLabel; private javax.swing.JPanel UpdateItemPanel; private javax.swing.JPanel UpdateOrderPanel; private javax.swing.JPanel UpdateSupplierPanel; private javax.swing.JLabel UpdatetoaLabel; private javax.swing.JLabel UpdatetpLabel; private javax.swing.JTextField Warehouse_Text; private javax.swing.JButton addButton; private javax.swing.JButton addOrderButton; private javax.swing.JButton addPLButton; private javax.swing.JButton addStatusButton; private javax.swing.JRadioButton allItemRepRadioButton; private javax.swing.JTextField amountFor; private javax.swing.JLabel background_green; private javax.swing.JLabel background_green10; private javax.swing.JLabel background_green11; private javax.swing.JLabel background_green15; private javax.swing.JLabel background_green4; private javax.swing.JLabel background_green5; private javax.swing.JLabel background_green6; private javax.swing.JLabel background_green7; private javax.swing.JLabel background_green8; private javax.swing.JLabel background_green9; private java.awt.Choice categoryChoice; private javax.swing.JLabel changePasswordLabel; private javax.swing.JButton clearButton; private javax.swing.JTextField commentQtxt; private javax.swing.JLabel contract_Label1; private com.toedter.calendar.JDateChooser dateStatus; private com.toedter.calendar.JDateChooser datetxt; private javax.swing.JButton deleteItemButton; private javax.swing.JTextArea descriptionText; private javax.swing.JTextArea descriptiontxt; private javax.swing.JLabel dropManageUserLabel; private com.toedter.calendar.JDateChooser eDate; private javax.swing.JButton genrateItemRepButton; private javax.swing.JButton inventoryButton; private javax.swing.JTabbedPane inventoryTab; private javax.swing.JTextField itemIDPricetxt; private javax.swing.JTextField itemIdPLtxt; private javax.swing.JRadioButton itemIdRadioButton; private javax.swing.JRadioButton itemIdRadioButton1; private javax.swing.JRadioButton itemNameRadioButton; private javax.swing.JRadioButton itemNameRadioButton1; private javax.swing.ButtonGroup itemRepbuttonGroup; private javax.swing.JTable itemSearchTable; private javax.swing.JTable itemTable; private javax.swing.JTable items_rep_Search_Table; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel13; private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel15; private javax.swing.JLabel jLabel16; private javax.swing.JLabel jLabel17; private javax.swing.JLabel jLabel18; private javax.swing.JLabel jLabel19; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel20; private javax.swing.JLabel jLabel21; private javax.swing.JLabel jLabel22; private javax.swing.JLabel jLabel23; private javax.swing.JLabel jLabel24; private javax.swing.JLabel jLabel25; private javax.swing.JLabel jLabel26; private javax.swing.JLabel jLabel27; private javax.swing.JLabel jLabel28; private javax.swing.JLabel jLabel29; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel30; private javax.swing.JLabel jLabel31; private javax.swing.JLabel jLabel32; 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.JMenu jMenu3; private javax.swing.JPanel jPanel24; private javax.swing.JScrollBar jScrollBar2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane10; private javax.swing.JScrollPane jScrollPane11; private javax.swing.JScrollPane jScrollPane12; private javax.swing.JScrollPane jScrollPane17; private javax.swing.JScrollPane jScrollPane18; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JScrollPane jScrollPane20; private javax.swing.JScrollPane jScrollPane3; private javax.swing.JScrollPane jScrollPane4; private javax.swing.JScrollPane jScrollPane5; private javax.swing.JScrollPane jScrollPane6; private javax.swing.JScrollPane jScrollPane7; private javax.swing.JScrollPane jScrollPane9; private javax.swing.JSeparator jSeparator1; private javax.swing.JButton logoutButton; private javax.swing.JLabel manageUserButtonLabel; private javax.swing.JRadioButton minLevelRepRadioButton; private javax.swing.JTextField minLevelText; private javax.swing.JLabel minLvlWarIcon; private javax.swing.JTextField minQtxt; private javax.swing.JTextField nameText; private java.awt.Choice oporationType; private javax.swing.JLabel orderArrivalLabel; private javax.swing.JButton orderClearButton; private javax.swing.JTextArea orderDescUptxt; private javax.swing.JLabel orderDescriptionLabel; private javax.swing.JTextArea orderDesctxt; private javax.swing.JLabel orderPriceLabel; private javax.swing.JButton orderRefreshButton; private javax.swing.JTable orderSearchTable; private javax.swing.JLabel orderTimeLabel; private javax.swing.JTextField orderTptxt; private javax.swing.JButton orderUpdateButton; private javax.swing.JTable orderUpdateTable; private javax.swing.JButton ordersButton; private javax.swing.JTabbedPane ordersTab; private javax.swing.JTable priceListTable; private javax.swing.JTextField pricePLtxt; private javax.swing.JButton quantityChangesReqButton; private javax.swing.JTextField quantityText; private javax.swing.JTextField quantitytxt; private javax.swing.JTextField rawtxt; private javax.swing.JTextField rawtxt1; private javax.swing.JButton refreshPLButton; private javax.swing.JButton refreshStausButton; private javax.swing.JButton refreshUpdateOrderButton; private com.toedter.calendar.JDateChooser repDateSearchtxt; private javax.swing.JTextField repIDSearchTxt; private javax.swing.JButton repSearchButton; private java.awt.Choice repStatusSearchtxt; private javax.swing.JTabbedPane reportTab; private javax.swing.JButton reportsButton; private javax.swing.JTextField sItemIdtxt; private javax.swing.JTextField sWorkerIdtxt; private javax.swing.JButton searchButton; private javax.swing.JButton searchButton1; private javax.swing.JButton searchOrderButton; private javax.swing.JButton searchOrderUpButton; private javax.swing.JTextField searchOrdertxt; private javax.swing.JButton searchPLButton; private javax.swing.JRadioButton searchRepDateRadioButton; private javax.swing.JRadioButton searchRepIDRadioButton; private javax.swing.JRadioButton searchRepStatRadioButton; private javax.swing.JButton searchStatusButton; private javax.swing.JTextField searchStatustxt; private javax.swing.JTextField searchUpOrdertxt; private javax.swing.JTextField searchtxt; private javax.swing.JTextField searchtxt1; private javax.swing.JTextField serialText; private javax.swing.JTextField shelftxt; private javax.swing.JTextField shelftxt1; private javax.swing.JButton showInventoryRepButton; private javax.swing.JButton showRepSearchButton; private javax.swing.JTable statusTable; private javax.swing.JButton submitQButton; private java.awt.Choice suppNamechoice; private javax.swing.JTextField supplierIdPLtxt; private javax.swing.JTextField supplierNamePLtxt; private javax.swing.JTextField supplierText; private javax.swing.JButton suppliersButton; private javax.swing.JTabbedPane suppliersTab; private javax.swing.JTextField suppliertxt; private com.toedter.calendar.JDateChooser toaDate; private com.toedter.calendar.JDateChooser toaUpdate; private com.toedter.calendar.JDateChooser tooDate; private javax.swing.JTextField tpUptxt; private javax.swing.JButton updateButton; private javax.swing.JRadioButton wareHousRepRadioButton; private java.awt.Choice wareHouschoice; private javax.swing.JLabel warehouse_label; private javax.swing.JLabel warehouse_label1; private javax.swing.JLabel warehouse_label2; private javax.swing.JTextField wherhoustxt; private javax.swing.JTextField wherhoustxt1; // End of variables declaration//GEN-END:variables }