SHARE
TWEET

assign

IrregularHonour Jun 2nd, 2016 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. package cqupestgui;
  3.  
  4. import java.awt.event.ActionListener;
  5. import java.awt.event.ActionEvent;
  6. import javax.swing.table.DefaultTableModel;
  7. import javax.swing.*;
  8. import java.io.*;
  9. import java.io.BufferedWriter;
  10. import java.io.BufferedReader;
  11. import java.io.FileNotFoundException;
  12. import java.io.FileReader;
  13. import java.io.IOException;
  14. import java.util.ArrayList;
  15. import java.lang.String;
  16.  
  17. public class CQUPestGUI extends javax.swing.JFrame  {
  18.  
  19. final double GENERALPEST = 190, INSPECTIONPRICE = 200, CONTROLFILL = 350;
  20. double total = 0;
  21. String jobTypes = "";
  22.  
  23.  
  24. protected int generateNumber(){    
  25.     /* This method should optimally include
  26.     a constraint to ensure that Math.random
  27.     always generates a unique number as an identifier.
  28.     (For the purpose of this assignment I have
  29.     decided against attempting this complication)*/
  30.     double randomNumber= Math.random() * 99999;
  31.     int id;
  32.     id = (int)randomNumber;
  33.     return id;
  34. }
  35. protected class Contractor {
  36.     int id =(generateNumber());
  37.     int phoneNumber;
  38.     String firstName, lastName, email;
  39.    
  40. }
  41.  /*It is not considered good policy
  42.     to allow users to view or edit unique
  43.     identifiers in SQL database.
  44.     However, as per the Assignment specifications
  45.     I have included Contract id to be displayed
  46.     (but not edited) in the Jtable*/
  47. protected class Contract{
  48.     int id =(generateNumber());
  49.     String date = txtContractDate.getText(),
  50.            customerName = txtCustomerName.getText(),
  51.            location = formatxtJobLocation.getText(),
  52.            jobTypes , contractorName;
  53.     double totalCharges;  
  54. }
  55.  
  56. protected class Customer{
  57.     int id;
  58.     int phoneNumber;
  59.     String firstName, lastName, email, address;
  60. }
  61.  
  62.     public CQUPestGUI() {
  63.         initComponents();
  64.        
  65.        
  66.         //The below section enables/disables checking TermiteInspection with TermiteControlFill
  67.         checkboxTermiteControlFill.addActionListener(new ActionListener()
  68.                 {
  69.                     public void actionPerformed(ActionEvent e)
  70.                 {
  71.                     if (checkboxTermiteControlFill.isSelected())
  72.                     {
  73.                         checkboxTermiteInspection.setSelected(true);
  74.                     }
  75.                     else if (!checkboxTermiteControlFill.isSelected())
  76.                     {
  77.                     checkboxTermiteInspection.setSelected(false);
  78.                     }
  79.                 }
  80.                 });
  81.        
  82.     }
  83.              
  84.     @SuppressWarnings("unchecked")
  85.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  86.     private void initComponents() {
  87.  
  88.         panelMainGUI = new javax.swing.JPanel();
  89.         tabMain = new javax.swing.JTabbedPane();
  90.         panelNewContractBackground = new javax.swing.JPanel();
  91.         panelNewContract = new javax.swing.JPanel();
  92.         txtCustomerName = new javax.swing.JTextField();
  93.         txtContractDate = new javax.swing.JTextField();
  94.         labelContractDate = new javax.swing.JLabel();
  95.         labelContractorName = new javax.swing.JLabel();
  96.         labelJobLocation = new javax.swing.JLabel();
  97.         labelJobDetails = new javax.swing.JLabel();
  98.         labelCustomerName = new javax.swing.JLabel();
  99.         checkboxTermiteControlFill = new javax.swing.JCheckBox();
  100.         checkboxGeneralPestInspection = new javax.swing.JCheckBox();
  101.         checkboxTermiteInspection = new javax.swing.JCheckBox();
  102.         panelTotalCharges = new javax.swing.JPanel();
  103.         txtTotalCharges = new javax.swing.JTextField();
  104.         buttonCalculate = new javax.swing.JButton();
  105.         formatxtJobLocation = new javax.swing.JFormattedTextField();
  106.         spinnerRooms = new javax.swing.JSpinner();
  107.         jLabel1 = new javax.swing.JLabel();
  108.         jLabel2 = new javax.swing.JLabel();
  109.         spinnerHalls = new javax.swing.JSpinner();
  110.         buttonSave = new javax.swing.JButton();
  111.         buttonReset = new javax.swing.JButton();
  112.         jLabel3 = new javax.swing.JLabel();
  113.         scrollStoredContracts = new javax.swing.JScrollPane();
  114.         tableStoredContracts = new javax.swing.JTable();
  115.         combolistChooseContractor = new javax.swing.JComboBox<>();
  116.         panelStoredContracts = new javax.swing.JPanel();
  117.         buttonSearchContractors = new javax.swing.JButton();
  118.         combolistContractors = new javax.swing.JComboBox<>();
  119.         buttonClearSearchResults = new javax.swing.JButton();
  120.         jLabel4 = new javax.swing.JLabel();
  121.         jLabel5 = new javax.swing.JLabel();
  122.         jScrollPane5 = new javax.swing.JScrollPane();
  123.         txtAreaSearchResults = new javax.swing.JTextArea();
  124.         jScrollPane4 = new javax.swing.JScrollPane();
  125.         txtAreaSavedContracts = new javax.swing.JTextArea();
  126.         buttonLoadStoredContracts = new javax.swing.JButton();
  127.         labelCQUPestGUI = new javax.swing.JLabel();
  128.         labelStudent = new javax.swing.JLabel();
  129.         buttonExit = new javax.swing.JButton();
  130.  
  131.         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  132.         setTitle("CQUPestGUI");
  133.  
  134.         labelContractDate.setText("Contract Date");
  135.  
  136.         labelContractorName.setText("Contractor");
  137.  
  138.         labelJobLocation.setText("Job Location");
  139.  
  140.         labelJobDetails.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
  141.         labelJobDetails.setText("New Job Details");
  142.  
  143.         labelCustomerName.setText("Customer Name");
  144.  
  145.         checkboxTermiteControlFill.setText("Termite Control Fill");
  146.  
  147.         checkboxGeneralPestInspection.setText("General Pest Inspection");
  148.         checkboxGeneralPestInspection.addActionListener(new java.awt.event.ActionListener() {
  149.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  150.                 checkboxGeneralPestInspectionActionPerformed(evt);
  151.             }
  152.         });
  153.  
  154.         checkboxTermiteInspection.setText("Termite Inspection");
  155.  
  156.         panelTotalCharges.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Total Charges", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
  157.  
  158.         txtTotalCharges.setEditable(false);
  159.         txtTotalCharges.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
  160.         txtTotalCharges.setText("Total Charges");
  161.         txtTotalCharges.setFocusable(false);
  162.         txtTotalCharges.addActionListener(new java.awt.event.ActionListener() {
  163.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  164.                 txtTotalChargesActionPerformed(evt);
  165.             }
  166.         });
  167.  
  168.         buttonCalculate.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
  169.         buttonCalculate.setText("Calculate");
  170.         buttonCalculate.addActionListener(new java.awt.event.ActionListener() {
  171.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  172.                 buttonCalculateActionPerformed(evt);
  173.             }
  174.         });
  175.  
  176.         javax.swing.GroupLayout panelTotalChargesLayout = new javax.swing.GroupLayout(panelTotalCharges);
  177.         panelTotalCharges.setLayout(panelTotalChargesLayout);
  178.         panelTotalChargesLayout.setHorizontalGroup(
  179.             panelTotalChargesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  180.             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelTotalChargesLayout.createSequentialGroup()
  181.                 .addContainerGap()
  182.                 .addComponent(buttonCalculate, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
  183.                 .addGap(30, 30, 30)
  184.                 .addComponent(txtTotalCharges, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)
  185.                 .addContainerGap())
  186.         );
  187.         panelTotalChargesLayout.setVerticalGroup(
  188.             panelTotalChargesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  189.             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelTotalChargesLayout.createSequentialGroup()
  190.                 .addContainerGap()
  191.                 .addGroup(panelTotalChargesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  192.                     .addComponent(buttonCalculate, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
  193.                     .addComponent(txtTotalCharges, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
  194.                 .addGap(24, 24, 24))
  195.         );
  196.  
  197.         formatxtJobLocation.addActionListener(new java.awt.event.ActionListener() {
  198.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  199.                 formatxtJobLocationActionPerformed(evt);
  200.             }
  201.         });
  202.  
  203.         spinnerRooms.setModel(new javax.swing.SpinnerNumberModel(0, 0, null, 1));
  204.  
  205.         jLabel1.setText("Number of Rooms");
  206.  
  207.         jLabel2.setText("Number of Halls");
  208.  
  209.         spinnerHalls.setModel(new javax.swing.SpinnerNumberModel(0, 0, null, 1));
  210.  
  211.         buttonSave.setText("Save and Reset");
  212.         buttonSave.addActionListener(new java.awt.event.ActionListener() {
  213.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  214.                 buttonSaveActionPerformed(evt);
  215.             }
  216.         });
  217.  
  218.         buttonReset.setText("Reset");
  219.         buttonReset.addActionListener(new java.awt.event.ActionListener() {
  220.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  221.                 buttonResetActionPerformed(evt);
  222.             }
  223.         });
  224.  
  225.         jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
  226.         jLabel3.setText("Contract");
  227.  
  228.         tableStoredContracts.setModel(new javax.swing.table.DefaultTableModel(
  229.             new Object [][] {
  230.  
  231.             },
  232.             new String [] {
  233.                 "ID", "Date", "Location", "Customer", "Job Type(s)", "Contractor", "Total Charges"
  234.             }
  235.         ) {
  236.             boolean[] canEdit = new boolean [] {
  237.                 false, false, false, false, false, false, false
  238.             };
  239.  
  240.             public boolean isCellEditable(int rowIndex, int columnIndex) {
  241.                 return canEdit [columnIndex];
  242.             }
  243.         });
  244.         tableStoredContracts.getTableHeader().setReorderingAllowed(false);
  245.         scrollStoredContracts.setViewportView(tableStoredContracts);
  246.  
  247.         combolistChooseContractor.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "John Smith", "Mary Eastman", "Dennis Mitchell", "Susan Hobbs" }));
  248.         combolistChooseContractor.addActionListener(new java.awt.event.ActionListener() {
  249.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  250.                 combolistChooseContractorActionPerformed(evt);
  251.             }
  252.         });
  253.  
  254.         javax.swing.GroupLayout panelNewContractLayout = new javax.swing.GroupLayout(panelNewContract);
  255.         panelNewContract.setLayout(panelNewContractLayout);
  256.         panelNewContractLayout.setHorizontalGroup(
  257.             panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  258.             .addGroup(panelNewContractLayout.createSequentialGroup()
  259.                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  260.                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelNewContractLayout.createSequentialGroup()
  261.                         .addComponent(buttonSave, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
  262.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  263.                         .addComponent(buttonReset)
  264.                         .addGap(16, 16, 16))
  265.                     .addGroup(panelNewContractLayout.createSequentialGroup()
  266.                         .addContainerGap()
  267.                         .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  268.                             .addGroup(panelNewContractLayout.createSequentialGroup()
  269.                                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  270.                                     .addComponent(checkboxGeneralPestInspection)
  271.                                     .addComponent(checkboxTermiteInspection)
  272.                                     .addGroup(panelNewContractLayout.createSequentialGroup()
  273.                                         .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  274.                                             .addComponent(jLabel1)
  275.                                             .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
  276.                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  277.                                         .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  278.                                             .addGroup(panelNewContractLayout.createSequentialGroup()
  279.                                                 .addComponent(spinnerHalls)
  280.                                                 .addGap(2, 2, 2))
  281.                                             .addComponent(spinnerRooms, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)))
  282.                                     .addComponent(labelJobDetails)
  283.                                     .addComponent(checkboxTermiteControlFill))
  284.                                 .addGap(34, 34, 34)
  285.                                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  286.                                     .addComponent(labelContractDate)
  287.                                     .addComponent(labelContractorName)
  288.                                     .addComponent(labelCustomerName))
  289.                                 .addGap(18, 18, 18)
  290.                                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  291.                                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  292.                                         .addComponent(combolistChooseContractor, 0, 176, Short.MAX_VALUE)
  293.                                         .addComponent(txtCustomerName))
  294.                                     .addComponent(txtContractDate, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE))
  295.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 117, Short.MAX_VALUE)
  296.                                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  297.                                     .addComponent(jLabel3)
  298.                                     .addComponent(scrollStoredContracts, javax.swing.GroupLayout.PREFERRED_SIZE, 603, javax.swing.GroupLayout.PREFERRED_SIZE)))
  299.                             .addGroup(panelNewContractLayout.createSequentialGroup()
  300.                                 .addComponent(labelJobLocation)
  301.                                 .addGap(0, 0, Short.MAX_VALUE))
  302.                             .addGroup(panelNewContractLayout.createSequentialGroup()
  303.                                 .addComponent(formatxtJobLocation, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE)
  304.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  305.                                 .addComponent(panelTotalCharges, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  306.                                 .addGap(221, 221, 221)))))
  307.                 .addContainerGap())
  308.         );
  309.         panelNewContractLayout.setVerticalGroup(
  310.             panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  311.             .addGroup(panelNewContractLayout.createSequentialGroup()
  312.                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  313.                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelNewContractLayout.createSequentialGroup()
  314.                         .addComponent(labelJobDetails)
  315.                         .addGap(8, 8, 8)
  316.                         .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  317.                             .addGroup(panelNewContractLayout.createSequentialGroup()
  318.                                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  319.                                     .addComponent(labelContractDate)
  320.                                     .addComponent(txtContractDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  321.                                 .addGap(28, 28, 28)
  322.                                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  323.                                     .addComponent(combolistChooseContractor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  324.                                     .addComponent(labelContractorName))
  325.                                 .addGap(31, 31, 31)
  326.                                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  327.                                     .addComponent(labelCustomerName)
  328.                                     .addComponent(txtCustomerName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
  329.                             .addGroup(panelNewContractLayout.createSequentialGroup()
  330.                                 .addComponent(checkboxGeneralPestInspection)
  331.                                 .addGap(10, 10, 10)
  332.                                 .addComponent(checkboxTermiteInspection)
  333.                                 .addGap(18, 18, 18)
  334.                                 .addComponent(checkboxTermiteControlFill)
  335.                                 .addGap(33, 33, 33)
  336.                                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  337.                                     .addComponent(jLabel1)
  338.                                     .addGroup(panelNewContractLayout.createSequentialGroup()
  339.                                         .addComponent(spinnerRooms, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  340.                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  341.                                         .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  342.                                             .addComponent(spinnerHalls, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  343.                                             .addComponent(jLabel2))))))
  344.                         .addGap(37, 37, 37)
  345.                         .addComponent(labelJobLocation)
  346.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  347.                         .addComponent(formatxtJobLocation, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
  348.                         .addGap(52, 52, 52))
  349.                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelNewContractLayout.createSequentialGroup()
  350.                         .addComponent(jLabel3)
  351.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  352.                         .addComponent(scrollStoredContracts, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE)
  353.                         .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  354.                             .addGroup(panelNewContractLayout.createSequentialGroup()
  355.                                 .addGap(153, 153, 153)
  356.                                 .addGroup(panelNewContractLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  357.                                     .addComponent(buttonSave)
  358.                                     .addComponent(buttonReset)))
  359.                             .addGroup(panelNewContractLayout.createSequentialGroup()
  360.                                 .addGap(30, 30, 30)
  361.                                 .addComponent(panelTotalCharges, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)))))
  362.                 .addGap(32, 32, 32))
  363.         );
  364.  
  365.         javax.swing.GroupLayout panelNewContractBackgroundLayout = new javax.swing.GroupLayout(panelNewContractBackground);
  366.         panelNewContractBackground.setLayout(panelNewContractBackgroundLayout);
  367.         panelNewContractBackgroundLayout.setHorizontalGroup(
  368.             panelNewContractBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  369.             .addComponent(panelNewContract, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  370.         );
  371.         panelNewContractBackgroundLayout.setVerticalGroup(
  372.             panelNewContractBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  373.             .addGroup(panelNewContractBackgroundLayout.createSequentialGroup()
  374.                 .addComponent(panelNewContract, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  375.                 .addGap(0, 0, Short.MAX_VALUE))
  376.         );
  377.  
  378.         tabMain.addTab("Enter Details", panelNewContractBackground);
  379.  
  380.         buttonSearchContractors.setText("Search By Contractor");
  381.         buttonSearchContractors.addActionListener(new java.awt.event.ActionListener() {
  382.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  383.                 buttonSearchContractorsActionPerformed(evt);
  384.             }
  385.         });
  386.  
  387.         combolistContractors.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "John Smith", "Mary Eastman", "Dennis Mitchell", "Susan Hobbs" }));
  388.         combolistContractors.addActionListener(new java.awt.event.ActionListener() {
  389.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  390.                 combolistContractorsActionPerformed(evt);
  391.             }
  392.         });
  393.  
  394.         buttonClearSearchResults.setText("Clear Results");
  395.         buttonClearSearchResults.addActionListener(new java.awt.event.ActionListener() {
  396.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  397.                 buttonClearSearchResultsActionPerformed(evt);
  398.             }
  399.         });
  400.  
  401.         jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
  402.         jLabel4.setText("Search Results for Contractor");
  403.  
  404.         jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
  405.         jLabel5.setText("Saved Contracts");
  406.  
  407.         txtAreaSearchResults.setEditable(false);
  408.         txtAreaSearchResults.setColumns(20);
  409.         txtAreaSearchResults.setRows(5);
  410.         jScrollPane5.setViewportView(txtAreaSearchResults);
  411.  
  412.         txtAreaSavedContracts.setEditable(false);
  413.         txtAreaSavedContracts.setColumns(20);
  414.         txtAreaSavedContracts.setRows(5);
  415.         txtAreaSavedContracts.setFocusable(false);
  416.         jScrollPane4.setViewportView(txtAreaSavedContracts);
  417.  
  418.         buttonLoadStoredContracts.setText("Load");
  419.         buttonLoadStoredContracts.addActionListener(new java.awt.event.ActionListener() {
  420.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  421.                 buttonLoadStoredContractsActionPerformed(evt);
  422.             }
  423.         });
  424.  
  425.         javax.swing.GroupLayout panelStoredContractsLayout = new javax.swing.GroupLayout(panelStoredContracts);
  426.         panelStoredContracts.setLayout(panelStoredContractsLayout);
  427.         panelStoredContractsLayout.setHorizontalGroup(
  428.             panelStoredContractsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  429.             .addGroup(panelStoredContractsLayout.createSequentialGroup()
  430.                 .addContainerGap()
  431.                 .addGroup(panelStoredContractsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  432.                     .addComponent(jScrollPane4)
  433.                     .addGroup(panelStoredContractsLayout.createSequentialGroup()
  434.                         .addGroup(panelStoredContractsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  435.                             .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelStoredContractsLayout.createSequentialGroup()
  436.                                 .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
  437.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  438.                                 .addComponent(buttonLoadStoredContracts))
  439.                             .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelStoredContractsLayout.createSequentialGroup()
  440.                                 .addComponent(combolistContractors, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE)
  441.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  442.                                 .addComponent(buttonSearchContractors, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
  443.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  444.                                 .addComponent(buttonClearSearchResults, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
  445.                             .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelStoredContractsLayout.createSequentialGroup()
  446.                                 .addComponent(jLabel4)
  447.                                 .addGap(18, 18, 18)
  448.                                 .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 1014, javax.swing.GroupLayout.PREFERRED_SIZE)))
  449.                         .addGap(0, 0, Short.MAX_VALUE)))
  450.                 .addContainerGap())
  451.         );
  452.         panelStoredContractsLayout.setVerticalGroup(
  453.             panelStoredContractsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  454.             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelStoredContractsLayout.createSequentialGroup()
  455.                 .addContainerGap()
  456.                 .addGroup(panelStoredContractsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  457.                     .addComponent(jLabel5)
  458.                     .addComponent(buttonLoadStoredContracts))
  459.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  460.                 .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
  461.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  462.                 .addGroup(panelStoredContractsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  463.                     .addComponent(combolistContractors, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  464.                     .addComponent(buttonSearchContractors, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
  465.                     .addComponent(buttonClearSearchResults, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
  466.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  467.                 .addGroup(panelStoredContractsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  468.                     .addComponent(jLabel4)
  469.                     .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE))
  470.                 .addGap(19, 19, 19))
  471.         );
  472.  
  473.         tabMain.addTab("Saved Contracts", panelStoredContracts);
  474.  
  475.         labelCQUPestGUI.setFont(new java.awt.Font("Monotype Corsiva", 0, 36)); // NOI18N
  476.         labelCQUPestGUI.setText("CQUPestGUI");
  477.  
  478.         labelStudent.setText("Laura West- Student Number: 10033418");
  479.         labelStudent.setFocusable(false);
  480.  
  481.         javax.swing.GroupLayout panelMainGUILayout = new javax.swing.GroupLayout(panelMainGUI);
  482.         panelMainGUI.setLayout(panelMainGUILayout);
  483.         panelMainGUILayout.setHorizontalGroup(
  484.             panelMainGUILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  485.             .addGroup(panelMainGUILayout.createSequentialGroup()
  486.                 .addContainerGap()
  487.                 .addGroup(panelMainGUILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  488.                     .addGroup(panelMainGUILayout.createSequentialGroup()
  489.                         .addComponent(labelCQUPestGUI, javax.swing.GroupLayout.PREFERRED_SIZE, 370, javax.swing.GroupLayout.PREFERRED_SIZE)
  490.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  491.                         .addComponent(labelStudent, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE))
  492.                     .addComponent(tabMain))
  493.                 .addContainerGap())
  494.         );
  495.         panelMainGUILayout.setVerticalGroup(
  496.             panelMainGUILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  497.             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelMainGUILayout.createSequentialGroup()
  498.                 .addGroup(panelMainGUILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  499.                     .addComponent(labelStudent)
  500.                     .addComponent(labelCQUPestGUI))
  501.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  502.                 .addComponent(tabMain, javax.swing.GroupLayout.PREFERRED_SIZE, 517, javax.swing.GroupLayout.PREFERRED_SIZE)
  503.                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  504.         );
  505.  
  506.         buttonExit.setText("Exit    ");
  507.         buttonExit.addActionListener(new java.awt.event.ActionListener() {
  508.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  509.                 buttonExitActionPerformed(evt);
  510.             }
  511.         });
  512.  
  513.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  514.         getContentPane().setLayout(layout);
  515.         layout.setHorizontalGroup(
  516.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  517.             .addGroup(layout.createSequentialGroup()
  518.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  519.                     .addComponent(panelMainGUI, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  520.                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
  521.                         .addGap(0, 0, Short.MAX_VALUE)
  522.                         .addComponent(buttonExit)))
  523.                 .addContainerGap())
  524.         );
  525.         layout.setVerticalGroup(
  526.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  527.             .addGroup(layout.createSequentialGroup()
  528.                 .addContainerGap()
  529.                 .addComponent(panelMainGUI, javax.swing.GroupLayout.PREFERRED_SIZE, 571, javax.swing.GroupLayout.PREFERRED_SIZE)
  530.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  531.                 .addComponent(buttonExit)
  532.                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  533.         );
  534.  
  535.         setSize(new java.awt.Dimension(1269, 657));
  536.         setLocationRelativeTo(null);
  537.     }// </editor-fold>                        
  538.  
  539.  
  540.  
  541.     private void buttonExitActionPerformed(java.awt.event.ActionEvent evt) {                                          
  542.         System.exit(0);
  543.     }                                          
  544.  
  545.     private void buttonLoadStoredContractsActionPerformed(java.awt.event.ActionEvent evt) {                                                          
  546.             readFile();
  547.     }                                                        
  548.  
  549.     private void buttonClearSearchResultsActionPerformed(java.awt.event.ActionEvent evt) {                                                        
  550.         txtAreaSearchResults.setText("");
  551.     }                                                        
  552.  
  553.     private void combolistContractorsActionPerformed(java.awt.event.ActionEvent evt) {                                                    
  554.         // TODO add your handling code here:
  555.     }                                                    
  556.  
  557.     private void buttonSearchContractorsActionPerformed(java.awt.event.ActionEvent evt) {                                                        
  558.         txtAreaSearchResults.setText(combolistContractors.getSelectedItem().toString());
  559.     }                                                      
  560.  
  561.     private void combolistChooseContractorActionPerformed(java.awt.event.ActionEvent evt) {                                                          
  562.         // TODO add your handling code here:
  563.     }                                                        
  564.  
  565.     private void buttonResetActionPerformed(java.awt.event.ActionEvent evt) {                                            
  566.         resetMethod();
  567.     }                                          
  568.  
  569.     private void buttonSaveActionPerformed(java.awt.event.ActionEvent evt) {                                          
  570.         /*the below method fixes a problem where the jtable
  571.         would not recieve data when the user selected the 'save' button but not the 'calculate' button*/
  572.         if (!buttonCalculate.isSelected())
  573.         {
  574.             calculateTotal();
  575.         }
  576.  
  577.         int contractId  =(generateNumber());
  578.         // the below ensures that necessary details to save a contract are entered by the user before populating the jtables or saving data to file
  579.         if (!txtContractDate.getText().trim().equals("") || !formatxtJobLocation.getText().trim().equals("") || !txtCustomerName.getText().trim().equals(""))
  580.         {
  581.             //populates the jtable with the user input
  582.             DefaultTableModel contractDetails = (DefaultTableModel) tableStoredContracts.getModel();
  583.             contractDetails.addRow(new Object[]{contractId, txtContractDate.getText(), formatxtJobLocation.getText(), txtCustomerName.getText(), jobTypes, combolistChooseContractor.getSelectedItem().toString(), "$" + total});
  584.  
  585.             ArrayList<String> lst = getTableData(tableStoredContracts);
  586.             writeFile(lst,"Pest.txt");
  587.         }
  588.         else
  589.         {
  590.             JOptionPane.showMessageDialog(null, "To save a contract, please enter all contract details.");
  591.         }
  592.  
  593.         //ensures that data is not added on to the next row input
  594.         resetMethod();
  595.     }                                          
  596.  
  597.     private void formatxtJobLocationActionPerformed(java.awt.event.ActionEvent evt) {                                                    
  598.  
  599.     }                                                  
  600.  
  601.     //triggers checkbox calculation and shows total
  602.     private void buttonCalculateActionPerformed(java.awt.event.ActionEvent evt) {                                                
  603.  
  604.         calculateTotal();
  605.  
  606.         txtTotalCharges.setText("$" + Double.toString(total));
  607.     }                                              
  608.  
  609.     private void txtTotalChargesActionPerformed(java.awt.event.ActionEvent evt) {                                                
  610.         // TODO add your handling code here:
  611.     }                                              
  612.  
  613.     private void checkboxGeneralPestInspectionActionPerformed(java.awt.event.ActionEvent evt) {                                                              
  614.  
  615.     }                                                            
  616.  
  617.    
  618.     //creates an array to store contract details
  619.     ArrayList <String> getTableData(JTable contractDetails)
  620.         {
  621.             int rowCount = contractDetails.getModel().getRowCount();
  622.             int columnCount = contractDetails.getModel().getColumnCount();
  623.            
  624.             String [][] storedContracts = new String[rowCount][columnCount];
  625.            
  626.             for (int row = 0; row < rowCount; row++)
  627.             {
  628.                 for (int column = 0; column < columnCount; column++)
  629.                 { storedContracts [row][column] = contractDetails.getModel().getValueAt(row, column).toString();
  630.                
  631.                 }
  632.             }
  633.             ArrayList<String> listContractors = new ArrayList<>();
  634.             StringBuilder s = new StringBuilder(200);
  635.             for( int i = 0; i<rowCount; i++){
  636.                 for(int j =0; j<columnCount; j++){
  637.                     s.append(storedContracts [i][j]);
  638.                     s.append("-");
  639.                 }
  640.                
  641.                 listContractors.add(s.toString());
  642.             }
  643.             return listContractors;
  644.         }
  645.    
  646.   protected void writeFile(ArrayList<String> listContractors, String toFile )
  647.     {
  648.         writeTxt(listContractors, toFile);
  649.     }
  650.    
  651.     protected void writeTxt(ArrayList<String> listContractors, String toFile)
  652.     {
  653.         try
  654.         {
  655.             FileOutputStream fileOut = new FileOutputStream(toFile, false);
  656.            
  657.             BufferedWriter bufferedW = new BufferedWriter(new OutputStreamWriter(fileOut));
  658.            
  659.             bufferedW.append("");
  660.             bufferedW.append('\n');
  661.            
  662.             for (int row = 0; row < listContractors.size(); row++)
  663.             {
  664.                
  665.                         bufferedW.append(listContractors.get(row).toString());
  666.                         bufferedW.append('\n');
  667.             }
  668.            
  669.             bufferedW.close();
  670.         }
  671.         catch (Exception e)
  672.         {
  673.             e.getStackTrace();
  674.         }
  675.     }
  676.            
  677.     //clears the fields
  678.     protected void resetMethod(){
  679.         checkboxGeneralPestInspection.setSelected(false); checkboxTermiteInspection.setSelected(false); checkboxTermiteControlFill.setSelected(false);
  680.         txtContractDate.setText(""); txtCustomerName.setText(""); formatxtJobLocation.setText("");
  681.        
  682.         spinnerRooms.setValue(0); spinnerHalls.setValue(0);
  683.         txtTotalCharges.setText(""); total = 0;
  684.         jobTypes = "";
  685.     }
  686.    
  687.     protected void readFile(ArrayList<String> listContractors)
  688.     {
  689.        BufferedReader reader = null;
  690.        //ArrayList showContract = new ArrayList();
  691.        
  692.        try
  693.        {
  694.            reader = new BufferedReader(new FileReader("Pest.txt"));
  695.            String nLine = reader.readLine();
  696.            
  697.            
  698.            while (nLine != null)
  699.            {
  700.                listContractors.add(nLine);
  701.                String [] rows = nLine.split("-");
  702.                for (String s: rows)
  703.                {
  704.                     System.out.println(s);
  705.                }
  706.                nLine = reader.readLine();
  707.            }
  708.        }
  709.        catch (FileNotFoundException e)
  710.        {
  711.            e.printStackTrace();
  712.        }
  713.        catch (IOException e)
  714.        {
  715.             e.printStackTrace();
  716.        }
  717.        displayStoredContracts(listContractors);
  718.     }
  719.    
  720.     protected void displayStoredContracts(ArrayList<String> listContractors)
  721.     {
  722.         for (int i = 0; i < listContractors.size(); i++)
  723.         {
  724.             txtAreaSavedContracts.append((String) listContractors.get(i));
  725.            
  726.            
  727.         }
  728.     }
  729.    
  730.    
  731.         /*initializes 'total' and 'jobTypes' with calculated
  732.     results from the checkboxes*/
  733.     private void calculateTotal (){
  734.         total = 0;
  735.         jobTypes = "";
  736.         if (checkboxGeneralPestInspection.isSelected())
  737.             {
  738.                 total = GENERALPEST;  
  739.                 jobTypes = "General Pest Inspection: Price $190 ";
  740.             }
  741.         if (checkboxTermiteInspection.isSelected()&& !checkboxTermiteControlFill.isSelected())
  742.             {
  743.                 total = total + INSPECTIONPRICE;  
  744.                 jobTypes = jobTypes + "Termite Inspection: Price $200 ";
  745.             }
  746.         else if (checkboxTermiteInspection.isSelected() && checkboxTermiteControlFill.isSelected())
  747.             {
  748.                 total = total + INSPECTIONPRICE + CONTROLFILL;
  749.                 jobTypes = jobTypes + "Termite Inspection: Price $200 " + "Control Fill: Price $350 ";
  750.             }
  751.        
  752.         int r = (Integer) spinnerRooms.getValue();
  753.         total= total + r * 10;
  754.         int h = (Integer) spinnerHalls.getValue();
  755.         total = total + h * 15;
  756.     }
  757.     private void txtAreaSearchResultsActionPerformed(java.awt.event.ActionEvent evt){
  758.        
  759.     }
  760.     /* I left most of the
  761.     automatically generated code alone because
  762.     the amount of research required to manipulate
  763.     it correctly without causing serious compilation
  764.     or runtime errors was prohibative to getting the
  765.     assignment completed on time
  766.      */
  767.     public static void main(String args[]) {
  768.         try {
  769.             for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
  770.                 if ("Nimbus".equals(info.getName())) {
  771.                     javax.swing.UIManager.setLookAndFeel(info.getClassName());
  772.                     break;
  773.                 }
  774.             }
  775.         } catch (ClassNotFoundException ex) {
  776.             java.util.logging.Logger.getLogger(CQUPestGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  777.         } catch (InstantiationException ex) {
  778.             java.util.logging.Logger.getLogger(CQUPestGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  779.         } catch (IllegalAccessException ex) {
  780.             java.util.logging.Logger.getLogger(CQUPestGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  781.         } catch (javax.swing.UnsupportedLookAndFeelException ex) {
  782.             java.util.logging.Logger.getLogger(CQUPestGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  783.         }
  784.         java.awt.EventQueue.invokeLater(() -> {
  785.             new CQUPestGUI().setVisible(true);
  786.         });
  787.     }
  788.     // Variables declaration - do not modify                    
  789.     private javax.swing.JButton buttonCalculate;
  790.     private javax.swing.JButton buttonClearSearchResults;
  791.     private javax.swing.JButton buttonExit;
  792.     protected javax.swing.JButton buttonLoadStoredContracts;
  793.     private javax.swing.JButton buttonReset;
  794.     private javax.swing.JButton buttonSave;
  795.     private javax.swing.JButton buttonSearchContractors;
  796.     private javax.swing.JCheckBox checkboxGeneralPestInspection;
  797.     private javax.swing.JCheckBox checkboxTermiteControlFill;
  798.     private javax.swing.JCheckBox checkboxTermiteInspection;
  799.     private javax.swing.JComboBox<String> combolistChooseContractor;
  800.     private javax.swing.JComboBox<String> combolistContractors;
  801.     private javax.swing.JFormattedTextField formatxtJobLocation;
  802.     private javax.swing.JLabel jLabel1;
  803.     private javax.swing.JLabel jLabel2;
  804.     private javax.swing.JLabel jLabel3;
  805.     private javax.swing.JLabel jLabel4;
  806.     private javax.swing.JLabel jLabel5;
  807.     private javax.swing.JScrollPane jScrollPane4;
  808.     private javax.swing.JScrollPane jScrollPane5;
  809.     private javax.swing.JLabel labelCQUPestGUI;
  810.     private javax.swing.JLabel labelContractDate;
  811.     private javax.swing.JLabel labelContractorName;
  812.     private javax.swing.JLabel labelCustomerName;
  813.     private javax.swing.JLabel labelJobDetails;
  814.     private javax.swing.JLabel labelJobLocation;
  815.     private javax.swing.JLabel labelStudent;
  816.     private javax.swing.JPanel panelMainGUI;
  817.     private javax.swing.JPanel panelNewContract;
  818.     private javax.swing.JPanel panelNewContractBackground;
  819.     private javax.swing.JPanel panelStoredContracts;
  820.     private javax.swing.JPanel panelTotalCharges;
  821.     private javax.swing.JScrollPane scrollStoredContracts;
  822.     private javax.swing.JSpinner spinnerHalls;
  823.     private javax.swing.JSpinner spinnerRooms;
  824.     private javax.swing.JTabbedPane tabMain;
  825.     private javax.swing.JTable tableStoredContracts;
  826.     private javax.swing.JTextArea txtAreaSavedContracts;
  827.     private javax.swing.JTextArea txtAreaSearchResults;
  828.     private javax.swing.JTextField txtContractDate;
  829.     private javax.swing.JTextField txtCustomerName;
  830.     private javax.swing.JTextField txtTotalCharges;
  831.     // End of variables declaration                  
  832.  
  833. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top