/Users/johnr/Dropbox/johnrayworth.info/largeFilesOutsideJSR/__IB-Other/Other/IA-Solutions-2019/Guy/Product/Investor's Application IA Working Final Draft/src/investor/s/application/ia/IAGUI.java
   1 /*
   2  * To change this license header, choose License Headers in Project Properties.
   3  * To change this template file, choose Tools | Templates
   4  * and open the template in the editor.
   5  */
   6 package investor.s.application.ia;
   7 
   8 import static investor.s.application.ia.ReadAndWriteTransactions.readingTransactionsFile;
   9 import static investor.s.application.ia.ReadAndWriteTransactions.savingTransactions;
  10 import static investor.s.application.ia.ReadAndWriteUsersInformation.readingStocksNameListFile;
  11 import static investor.s.application.ia.ReadAndWriteUsersInformation.readingUserListFile;
  12 import static investor.s.application.ia.ReadAndWriteUsersInformation.savingStocksNameList;
  13 import static investor.s.application.ia.ReadAndWriteUsersInformation.savingUsersList;
  14 import java.util.ArrayList;
  15 
  16 /**
  17  *
  18  * @author 17887
  19  */
  20 public class IAGUI extends javax.swing.JFrame {
  21 
  22     private ArrayList<User> users = new ArrayList<User>();
  23     private ArrayList<Stock> stocksList = new ArrayList<Stock>();
  24     private ArrayList<String> stocksNameList = new ArrayList<String>();
  25     private int usingUserNumber = -1;//user number of user using program
  26     private boolean loggedIn = false;
  27     private ArrayList<Transaction> transactions = new ArrayList<Transaction>();
  28 
  29     /**
  30      * Creates new form IAGUI
  31      */
  32     public IAGUI() {
  33         initComponents();
  34         String[] blankItem = new String[1];
  35         blankItem[0] = "";
  36         existingStockNameCB.setModel(new javax.swing.DefaultComboBoxModel<>(blankItem));
  37         users = readingUserListFile();
  38     }
  39 
  40     /**
  41      * This method is called from within the constructor to initialize the form.
  42      * WARNING: Do NOT modify this code. The content of this method is always
  43      * regenerated by the Form Editor.
  44      */
  45     @SuppressWarnings("unchecked")
  46     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  47     private void initComponents() {
  48 
  49         jTabbedPane1 = new javax.swing.JTabbedPane();
  50         jPanel4 = new javax.swing.JPanel();
  51         jLabel7 = new javax.swing.JLabel();
  52         returningUsernameTF = new javax.swing.JTextField();
  53         jLabel8 = new javax.swing.JLabel();
  54         returningPasswordTF = new javax.swing.JTextField();
  55         jLabel9 = new javax.swing.JLabel();
  56         newUsernameTF = new javax.swing.JTextField();
  57         jLabel10 = new javax.swing.JLabel();
  58         newUserPasswordTF = new javax.swing.JTextField();
  59         jLabel11 = new javax.swing.JLabel();
  60         jLabel12 = new javax.swing.JLabel();
  61         jLabel13 = new javax.swing.JLabel();
  62         newUserConfirmPasswordTF = new javax.swing.JTextField();
  63         returningUserLoginTF = new javax.swing.JButton();
  64         addNewUserInfoTF = new javax.swing.JButton();
  65         deleteAccountButton = new javax.swing.JButton();
  66         saveUpdatesButton = new javax.swing.JButton();
  67         jLabel33 = new javax.swing.JLabel();
  68         loginErrorTF = new javax.swing.JTextField();
  69         jPanel1 = new javax.swing.JPanel();
  70         jLabel2 = new javax.swing.JLabel();
  71         jLabel3 = new javax.swing.JLabel();
  72         newStockNameTransactionTF = new javax.swing.JTextField();
  73         jLabel4 = new javax.swing.JLabel();
  74         dateDayTransactionCB = new javax.swing.JComboBox<>();
  75         dateMonthTransactionCB = new javax.swing.JComboBox<>();
  76         dateYearTransactionCB = new javax.swing.JComboBox<>();
  77         jLabel5 = new javax.swing.JLabel();
  78         buyTransactionCheckBox = new javax.swing.JCheckBox();
  79         sellTransactionCheckBox = new javax.swing.JCheckBox();
  80         enterStockDividendsTF = new javax.swing.JTextField();
  81         jLabel6 = new javax.swing.JLabel();
  82         enterStockPriceTF = new javax.swing.JTextField();
  83         enterTransactionButton = new javax.swing.JButton();
  84         jLabel1 = new javax.swing.JLabel();
  85         enterNumberOfSharesTF = new javax.swing.JTextField();
  86         transactionErrorTF = new javax.swing.JTextField();
  87         jLabel28 = new javax.swing.JLabel();
  88         newStockButton = new javax.swing.JCheckBox();
  89         existingStockButton = new javax.swing.JCheckBox();
  90         existingStockNameCB = new javax.swing.JComboBox<>();
  91         jLabel30 = new javax.swing.JLabel();
  92         jLabel31 = new javax.swing.JLabel();
  93         jLabel32 = new javax.swing.JLabel();
  94         jPanel2 = new javax.swing.JPanel();
  95         jLabel14 = new javax.swing.JLabel();
  96         jLabel15 = new javax.swing.JLabel();
  97         jLabel16 = new javax.swing.JLabel();
  98         jLabel17 = new javax.swing.JLabel();
  99         calculateProfitButton = new javax.swing.JButton();
 100         jLabel18 = new javax.swing.JLabel();
 101         jLabel19 = new javax.swing.JLabel();
 102         displaySpecificStockInfoButton = new javax.swing.JButton();
 103         jLabel20 = new javax.swing.JLabel();
 104         jLabel21 = new javax.swing.JLabel();
 105         enterTheoreticalAmountSoldTF = new javax.swing.JTextField();
 106         displayTotalSharesOwnedTF = new javax.swing.JTextField();
 107         displayTotalDividendsToDateTF = new javax.swing.JTextField();
 108         displayTotalMoneyInvestedTF = new javax.swing.JTextField();
 109         displayCurrentAveragePriceTF = new javax.swing.JTextField();
 110         jLabel22 = new javax.swing.JLabel();
 111         enterTheoreticalPriceSoldTF = new javax.swing.JTextField();
 112         displayTheoreticalProfitTF = new javax.swing.JTextField();
 113         stockSpecificStockToDisplayTF = new javax.swing.JTextField();
 114         jLabel26 = new javax.swing.JLabel();
 115         clearSpecificStockInfoButton = new javax.swing.JButton();
 116         enterStockToSellTF = new javax.swing.JTextField();
 117         jPanel3 = new javax.swing.JPanel();
 118         jScrollPane1 = new javax.swing.JScrollPane();
 119         transactionsTable = new javax.swing.JTable();
 120         jLabel23 = new javax.swing.JLabel();
 121         jLabel24 = new javax.swing.JLabel();
 122         sortByTransactionTableCB = new javax.swing.JComboBox<>();
 123         jLabel25 = new javax.swing.JLabel();
 124         sortOrderTransactionTableCB = new javax.swing.JComboBox<>();
 125         displayTransactionTableButton = new javax.swing.JButton();
 126         jLabel27 = new javax.swing.JLabel();
 127         stockToDisplayTransactionsTableTF = new javax.swing.JTextField();
 128         jLabel29 = new javax.swing.JLabel();
 129         jButton1 = new javax.swing.JButton();
 130         menuBar = new javax.swing.JMenuBar();
 131         fileMenu = new javax.swing.JMenu();
 132         openMenuItem = new javax.swing.JMenuItem();
 133         saveMenuItem = new javax.swing.JMenuItem();
 134         saveAsMenuItem = new javax.swing.JMenuItem();
 135         exitMenuItem = new javax.swing.JMenuItem();
 136         editMenu = new javax.swing.JMenu();
 137         cutMenuItem = new javax.swing.JMenuItem();
 138         copyMenuItem = new javax.swing.JMenuItem();
 139         pasteMenuItem = new javax.swing.JMenuItem();
 140         deleteMenuItem = new javax.swing.JMenuItem();
 141         helpMenu = new javax.swing.JMenu();
 142         contentsMenuItem = new javax.swing.JMenuItem();
 143         aboutMenuItem = new javax.swing.JMenuItem();
 144 
 145         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
 146 
 147         jLabel7.setText("Username");
 148 
 149         returningUsernameTF.addActionListener(new java.awt.event.ActionListener() {
 150             public void actionPerformed(java.awt.event.ActionEvent evt) {
 151                 returningUsernameTFActionPerformed(evt);
 152             }
 153         });
 154 
 155         jLabel8.setText("Password");
 156 
 157         returningPasswordTF.addActionListener(new java.awt.event.ActionListener() {
 158             public void actionPerformed(java.awt.event.ActionEvent evt) {
 159                 returningPasswordTFActionPerformed(evt);
 160             }
 161         });
 162 
 163         jLabel9.setText("Username");
 164 
 165         newUsernameTF.addActionListener(new java.awt.event.ActionListener() {
 166             public void actionPerformed(java.awt.event.ActionEvent evt) {
 167                 newUsernameTFActionPerformed(evt);
 168             }
 169         });
 170 
 171         jLabel10.setText("Password");
 172 
 173         jLabel11.setText("Returning User");
 174 
 175         jLabel12.setText("New User");
 176 
 177         jLabel13.setText("Confirm Password");
 178 
 179         returningUserLoginTF.setText("Login");
 180         returningUserLoginTF.addMouseListener(new java.awt.event.MouseAdapter() {
 181             public void mouseReleased(java.awt.event.MouseEvent evt) {
 182                 returningUserLoginTFMouseReleased(evt);
 183             }
 184         });
 185 
 186         addNewUserInfoTF.setText("Add User");
 187         addNewUserInfoTF.addMouseListener(new java.awt.event.MouseAdapter() {
 188             public void mouseReleased(java.awt.event.MouseEvent evt) {
 189                 addNewUserInfoTFMouseReleased(evt);
 190             }
 191         });
 192 
 193         deleteAccountButton.setText("Delete Account");
 194         deleteAccountButton.addMouseListener(new java.awt.event.MouseAdapter() {
 195             public void mouseReleased(java.awt.event.MouseEvent evt) {
 196                 deleteAccountButtonMouseReleased(evt);
 197             }
 198         });
 199 
 200         saveUpdatesButton.setText("Save Updates");
 201         saveUpdatesButton.addMouseListener(new java.awt.event.MouseAdapter() {
 202             public void mouseReleased(java.awt.event.MouseEvent evt) {
 203                 saveUpdatesButtonMouseReleased(evt);
 204             }
 205         });
 206         saveUpdatesButton.addActionListener(new java.awt.event.ActionListener() {
 207             public void actionPerformed(java.awt.event.ActionEvent evt) {
 208                 saveUpdatesButtonActionPerformed(evt);
 209             }
 210         });
 211 
 212         jLabel33.setText("Error:");
 213 
 214         loginErrorTF.addActionListener(new java.awt.event.ActionListener() {
 215             public void actionPerformed(java.awt.event.ActionEvent evt) {
 216                 loginErrorTFActionPerformed(evt);
 217             }
 218         });
 219 
 220         javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
 221         jPanel4.setLayout(jPanel4Layout);
 222         jPanel4Layout.setHorizontalGroup(
 223             jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 224             .addGroup(jPanel4Layout.createSequentialGroup()
 225                 .addGap(191, 191, 191)
 226                 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
 227                     .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 228                         .addGroup(jPanel4Layout.createSequentialGroup()
 229                             .addGap(101, 101, 101)
 230                             .addComponent(jLabel12))
 231                         .addGroup(jPanel4Layout.createSequentialGroup()
 232                             .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 233                                 .addGroup(jPanel4Layout.createSequentialGroup()
 234                                     .addGap(52, 52, 52)
 235                                     .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 236                                         .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
 237                                             .addComponent(jLabel10)
 238                                             .addGap(18, 18, 18))
 239                                         .addGroup(jPanel4Layout.createSequentialGroup()
 240                                             .addComponent(jLabel9)
 241                                             .addGap(18, 18, 18))))
 242                                 .addGroup(jPanel4Layout.createSequentialGroup()
 243                                     .addComponent(jLabel13)
 244                                     .addGap(18, 18, 18)))
 245                             .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
 246                                 .addComponent(newUserPasswordTF, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
 247                                 .addComponent(newUsernameTF)
 248                                 .addComponent(newUserConfirmPasswordTF, javax.swing.GroupLayout.Alignment.TRAILING))))
 249                     .addGroup(jPanel4Layout.createSequentialGroup()
 250                         .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 251                             .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING)
 252                             .addComponent(jLabel7))
 253                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 254                         .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
 255                             .addComponent(returningUsernameTF, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
 256                             .addComponent(returningPasswordTF))))
 257                 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 258                     .addGroup(jPanel4Layout.createSequentialGroup()
 259                         .addGap(35, 35, 35)
 260                         .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 261                             .addComponent(addNewUserInfoTF)
 262                             .addComponent(returningUserLoginTF)
 263                             .addComponent(deleteAccountButton)))
 264                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
 265                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 266                         .addComponent(saveUpdatesButton)
 267                         .addGap(150, 150, 150))))
 268             .addGroup(jPanel4Layout.createSequentialGroup()
 269                 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 270                     .addGroup(jPanel4Layout.createSequentialGroup()
 271                         .addGap(273, 273, 273)
 272                         .addComponent(jLabel11))
 273                     .addGroup(jPanel4Layout.createSequentialGroup()
 274                         .addGap(114, 114, 114)
 275                         .addComponent(jLabel33)
 276                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 277                         .addComponent(loginErrorTF, javax.swing.GroupLayout.PREFERRED_SIZE, 356, javax.swing.GroupLayout.PREFERRED_SIZE)))
 278                 .addGap(149, 455, Short.MAX_VALUE))
 279         );
 280         jPanel4Layout.setVerticalGroup(
 281             jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 282             .addGroup(jPanel4Layout.createSequentialGroup()
 283                 .addGap(49, 49, 49)
 284                 .addComponent(jLabel11)
 285                 .addGap(18, 18, 18)
 286                 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 287                     .addComponent(jLabel7)
 288                     .addComponent(returningUsernameTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 289                     .addComponent(returningUserLoginTF))
 290                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 291                 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 292                     .addComponent(jLabel8)
 293                     .addComponent(returningPasswordTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 294                     .addComponent(deleteAccountButton))
 295                 .addGap(26, 26, 26)
 296                 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
 297                     .addComponent(jLabel12)
 298                     .addComponent(saveUpdatesButton))
 299                 .addGap(18, 18, 18)
 300                 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 301                     .addComponent(jLabel9)
 302                     .addComponent(newUsernameTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 303                 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 304                     .addGroup(jPanel4Layout.createSequentialGroup()
 305                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 306                         .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 307                             .addComponent(jLabel10)
 308                             .addComponent(newUserPasswordTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
 309                     .addGroup(jPanel4Layout.createSequentialGroup()
 310                         .addGap(4, 4, 4)
 311                         .addComponent(addNewUserInfoTF)))
 312                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 313                 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 314                     .addComponent(jLabel13)
 315                     .addComponent(newUserConfirmPasswordTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 316                 .addGap(28, 28, 28)
 317                 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 318                     .addComponent(jLabel33)
 319                     .addComponent(loginErrorTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 320                 .addContainerGap(57, Short.MAX_VALUE))
 321         );
 322 
 323         jTabbedPane1.addTab("User Login/New User/Save Updates", jPanel4);
 324 
 325         jLabel2.setText("Stock Name");
 326 
 327         jLabel3.setText("Type of Transaction");
 328 
 329         jLabel4.setText("Date");
 330 
 331         dateDayTransactionCB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { " ", "1 ", "2 ", "3 ", "4 ", "5 ", "6 ", "7 ", "8 ", "9 ", "10 ", "11 ", "12 ", "13 ", "14 ", "15 ", "16 ", "17 ", "18 ", "19 ", "20 ", "21 ", "22 ", "23 ", "24 ", "25 ", "26 ", "27 ", "28 ", "29 ", "30 ", "31 " }));
 332 
 333         dateMonthTransactionCB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { " ", "January ", "February ", "March ", "April ", "May ", "June ", "July ", "August ", "September ", "October ", "November ", "December " }));
 334 
 335         dateYearTransactionCB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { " ", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025", "2026", "2027", "2028", "2029", "2030", "2031", "2032", "2033", "2034", "2035", "2036", "2037", "2038", "2039", "2040", "2041", "2042", "2043", "2044", "2045", "2046", "2047", "2048", "2049", "2050", "2051", "2052", "2053", "2054", "2055", "2056", "2057", "2058", "2059", "2060", "2061", "2062", "2063", "2064", "2065", "2066", "2067", "2068", "2069", "2070", "2071", "2072", "2073", "2074", "2075", "2076", "2077", "2078", "2079", "2080", "2081", "2082", "2083", "2084", "2085", "2086", "2087", "2088", "2089", "2090", "2091", "2092", "2093", "2094", "2095", "2096", "2097", "2098", "2099", "2100" }));
 336 
 337         jLabel5.setText("Dividends per Share");
 338 
 339         buyTransactionCheckBox.setText("Buy");
 340         buyTransactionCheckBox.addActionListener(new java.awt.event.ActionListener() {
 341             public void actionPerformed(java.awt.event.ActionEvent evt) {
 342                 buyTransactionCheckBoxActionPerformed(evt);
 343             }
 344         });
 345 
 346         sellTransactionCheckBox.setText("Sell");
 347 
 348         jLabel6.setText("Price");
 349 
 350         enterTransactionButton.setText("Enter Transaction");
 351         enterTransactionButton.addMouseListener(new java.awt.event.MouseAdapter() {
 352             public void mouseReleased(java.awt.event.MouseEvent evt) {
 353                 enterTransactionButtonMouseReleased(evt);
 354             }
 355         });
 356 
 357         jLabel1.setText("Number of Shares");
 358 
 359         jLabel28.setText("Error");
 360 
 361         newStockButton.setText("New Stock");
 362 
 363         existingStockButton.setText("Existing Stock");
 364         existingStockButton.addActionListener(new java.awt.event.ActionListener() {
 365             public void actionPerformed(java.awt.event.ActionEvent evt) {
 366                 existingStockButtonActionPerformed(evt);
 367             }
 368         });
 369 
 370         existingStockNameCB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
 371 
 372         jLabel30.setText("(Integer)");
 373 
 374         jLabel31.setText("(Number to 2 decimal places)");
 375 
 376         jLabel32.setText("(Number to 2 decimal places)");
 377 
 378         javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
 379         jPanel1.setLayout(jPanel1Layout);
 380         jPanel1Layout.setHorizontalGroup(
 381             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 382             .addGroup(jPanel1Layout.createSequentialGroup()
 383                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 384                     .addGroup(jPanel1Layout.createSequentialGroup()
 385                         .addGap(172, 172, 172)
 386                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
 387                             .addComponent(enterTransactionButton)
 388                             .addGroup(jPanel1Layout.createSequentialGroup()
 389                                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 390                                     .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)
 391                                     .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
 392                                     .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
 393                                     .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)
 394                                     .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
 395                                 .addGap(18, 18, 18)
 396                                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 397                                     .addGroup(jPanel1Layout.createSequentialGroup()
 398                                         .addComponent(newStockButton)
 399                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 400                                         .addComponent(existingStockButton))
 401                                     .addGroup(jPanel1Layout.createSequentialGroup()
 402                                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
 403                                             .addComponent(enterStockDividendsTF, javax.swing.GroupLayout.Alignment.LEADING)
 404                                             .addComponent(enterNumberOfSharesTF, javax.swing.GroupLayout.Alignment.LEADING)
 405                                             .addComponent(dateDayTransactionCB, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 406                                             .addComponent(enterStockPriceTF))
 407                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 408                                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 409                                             .addGroup(jPanel1Layout.createSequentialGroup()
 410                                                 .addComponent(dateMonthTransactionCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 411                                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 412                                                 .addComponent(dateYearTransactionCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 413                                             .addComponent(jLabel30)
 414                                             .addComponent(jLabel31)
 415                                             .addComponent(jLabel32)))
 416                                     .addGroup(jPanel1Layout.createSequentialGroup()
 417                                         .addComponent(newStockNameTransactionTF, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
 418                                         .addGap(36, 36, 36)
 419                                         .addComponent(existingStockNameCB, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE))))))
 420                     .addGroup(jPanel1Layout.createSequentialGroup()
 421                         .addGap(160, 160, 160)
 422                         .addComponent(jLabel3)
 423                         .addGap(18, 18, 18)
 424                         .addComponent(buyTransactionCheckBox)
 425                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 426                         .addComponent(sellTransactionCheckBox)))
 427                 .addContainerGap(354, Short.MAX_VALUE))
 428             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
 429                 .addGap(0, 0, Short.MAX_VALUE)
 430                 .addComponent(jLabel28)
 431                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 432                 .addComponent(transactionErrorTF, javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE)
 433                 .addGap(66, 66, 66))
 434         );
 435         jPanel1Layout.setVerticalGroup(
 436             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 437             .addGroup(jPanel1Layout.createSequentialGroup()
 438                 .addGap(28, 28, 28)
 439                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 440                     .addComponent(jLabel3)
 441                     .addComponent(buyTransactionCheckBox)
 442                     .addComponent(sellTransactionCheckBox))
 443                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 444                     .addGroup(jPanel1Layout.createSequentialGroup()
 445                         .addGap(18, 18, 18)
 446                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 447                             .addComponent(newStockButton)
 448                             .addComponent(existingStockButton))
 449                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 450                         .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 451                             .addComponent(newStockNameTransactionTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 452                             .addComponent(existingStockNameCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
 453                     .addGroup(jPanel1Layout.createSequentialGroup()
 454                         .addGap(37, 37, 37)
 455                         .addComponent(jLabel2)))
 456                 .addGap(18, 18, 18)
 457                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 458                     .addComponent(jLabel4)
 459                     .addComponent(dateDayTransactionCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 460                     .addComponent(dateMonthTransactionCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 461                     .addComponent(dateYearTransactionCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 462                 .addGap(18, 18, 18)
 463                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 464                     .addComponent(jLabel1)
 465                     .addComponent(enterNumberOfSharesTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 466                     .addComponent(jLabel30))
 467                 .addGap(18, 18, 18)
 468                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 469                     .addComponent(jLabel5)
 470                     .addComponent(enterStockDividendsTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 471                     .addComponent(jLabel31))
 472                 .addGap(18, 18, 18)
 473                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 474                     .addComponent(jLabel6)
 475                     .addComponent(enterStockPriceTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 476                     .addComponent(jLabel32))
 477                 .addGap(18, 18, 18)
 478                 .addComponent(enterTransactionButton)
 479                 .addGap(18, 18, 18)
 480                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 481                     .addComponent(transactionErrorTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 482                     .addComponent(jLabel28))
 483                 .addContainerGap(45, Short.MAX_VALUE))
 484         );
 485 
 486         jTabbedPane1.addTab("Enter New Transaction", jPanel1);
 487 
 488         jLabel14.setText("Display Information For");
 489 
 490         jLabel15.setText("Total Shares Owned");
 491 
 492         jLabel16.setText("Total Money Invested");
 493 
 494         calculateProfitButton.setText("Calculate Profit");
 495         calculateProfitButton.addMouseListener(new java.awt.event.MouseAdapter() {
 496             public void mouseReleased(java.awt.event.MouseEvent evt) {
 497                 calculateProfitButtonMouseReleased(evt);
 498             }
 499         });
 500         calculateProfitButton.addActionListener(new java.awt.event.ActionListener() {
 501             public void actionPerformed(java.awt.event.ActionEvent evt) {
 502                 calculateProfitButtonActionPerformed(evt);
 503             }
 504         });
 505 
 506         jLabel18.setText("Current Average Price");
 507 
 508         jLabel19.setText("Total Dividends to Date");
 509 
 510         displaySpecificStockInfoButton.setText("Display");
 511         displaySpecificStockInfoButton.addMouseListener(new java.awt.event.MouseAdapter() {
 512             public void mouseReleased(java.awt.event.MouseEvent evt) {
 513                 displaySpecificStockInfoButtonMouseReleased(evt);
 514             }
 515         });
 516 
 517         jLabel20.setText("Sell");
 518 
 519         enterTheoreticalAmountSoldTF.setText("(No. of Shares)");
 520 
 521         jLabel22.setText("at");
 522 
 523         enterTheoreticalPriceSoldTF.setText("(Price)");
 524         enterTheoreticalPriceSoldTF.addActionListener(new java.awt.event.ActionListener() {
 525             public void actionPerformed(java.awt.event.ActionEvent evt) {
 526                 enterTheoreticalPriceSoldTFActionPerformed(evt);
 527             }
 528         });
 529 
 530         stockSpecificStockToDisplayTF.addActionListener(new java.awt.event.ActionListener() {
 531             public void actionPerformed(java.awt.event.ActionEvent evt) {
 532                 stockSpecificStockToDisplayTFActionPerformed(evt);
 533             }
 534         });
 535 
 536         jLabel26.setText("Profit: ");
 537 
 538         clearSpecificStockInfoButton.setText("Clear");
 539         clearSpecificStockInfoButton.addMouseListener(new java.awt.event.MouseAdapter() {
 540             public void mouseReleased(java.awt.event.MouseEvent evt) {
 541                 clearSpecificStockInfoButtonMouseReleased(evt);
 542             }
 543         });
 544 
 545         enterStockToSellTF.setText("(Stock Name)");
 546 
 547         javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
 548         jPanel2.setLayout(jPanel2Layout);
 549         jPanel2Layout.setHorizontalGroup(
 550             jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 551             .addGroup(jPanel2Layout.createSequentialGroup()
 552                 .addGap(175, 175, 175)
 553                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 554                     .addGroup(jPanel2Layout.createSequentialGroup()
 555                         .addGap(146, 146, 146)
 556                         .addComponent(calculateProfitButton)
 557                         .addGap(18, 18, 18)
 558                         .addComponent(jLabel26)
 559                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 560                         .addComponent(displayTheoreticalProfitTF, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
 561                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 562                         .addComponent(jLabel21))
 563                     .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
 564                         .addGroup(jPanel2Layout.createSequentialGroup()
 565                             .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
 566                                 .addComponent(jLabel14)
 567                                 .addGroup(jPanel2Layout.createSequentialGroup()
 568                                     .addComponent(jLabel17)
 569                                     .addGap(119, 119, 119))
 570                                 .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.LEADING))
 571                             .addGap(24, 24, 24)
 572                             .addComponent(stockSpecificStockToDisplayTF, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
 573                             .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 574                             .addComponent(displaySpecificStockInfoButton, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))
 575                         .addGroup(jPanel2Layout.createSequentialGroup()
 576                             .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 577                                 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
 578                                     .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
 579                                         .addComponent(jLabel19)
 580                                         .addComponent(jLabel18)
 581                                         .addComponent(jLabel16)
 582                                         .addComponent(jLabel15))
 583                                     .addGap(18, 18, 18)
 584                                     .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
 585                                         .addComponent(displayTotalMoneyInvestedTF)
 586                                         .addComponent(displayCurrentAveragePriceTF)
 587                                         .addComponent(displayTotalSharesOwnedTF)
 588                                         .addComponent(displayTotalDividendsToDateTF, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)))
 589                                 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
 590                                     .addComponent(enterStockToSellTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 591                                     .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 592                                     .addComponent(enterTheoreticalAmountSoldTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 593                                     .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 594                                     .addComponent(jLabel22)))
 595                             .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 596                             .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 597                                 .addComponent(enterTheoreticalPriceSoldTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 598                                 .addComponent(clearSpecificStockInfoButton, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)))))
 599                 .addContainerGap(353, Short.MAX_VALUE))
 600         );
 601         jPanel2Layout.setVerticalGroup(
 602             jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 603             .addGroup(jPanel2Layout.createSequentialGroup()
 604                 .addGap(46, 46, 46)
 605                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 606                     .addComponent(jLabel14)
 607                     .addComponent(displaySpecificStockInfoButton)
 608                     .addComponent(stockSpecificStockToDisplayTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 609                 .addGap(18, 18, 18)
 610                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 611                     .addComponent(jLabel15)
 612                     .addComponent(displayTotalSharesOwnedTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 613                     .addComponent(clearSpecificStockInfoButton))
 614                 .addGap(18, 18, 18)
 615                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 616                     .addComponent(jLabel16)
 617                     .addComponent(displayTotalMoneyInvestedTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 618                 .addGap(18, 18, 18)
 619                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 620                     .addComponent(jLabel18)
 621                     .addComponent(displayCurrentAveragePriceTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 622                 .addGap(18, 18, 18)
 623                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 624                     .addComponent(jLabel19)
 625                     .addComponent(displayTotalDividendsToDateTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 626                 .addGap(23, 23, 23)
 627                 .addComponent(jLabel17)
 628                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 629                     .addGroup(jPanel2Layout.createSequentialGroup()
 630                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)
 631                         .addComponent(jLabel21)
 632                         .addGap(110, 110, 110))
 633                     .addGroup(jPanel2Layout.createSequentialGroup()
 634                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 635                         .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 636                             .addComponent(jLabel20)
 637                             .addComponent(enterTheoreticalAmountSoldTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 638                             .addComponent(jLabel22)
 639                             .addComponent(enterStockToSellTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 640                             .addComponent(enterTheoreticalPriceSoldTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 641                         .addGap(11, 11, 11)
 642                         .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 643                             .addComponent(calculateProfitButton)
 644                             .addComponent(displayTheoreticalProfitTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 645                             .addComponent(jLabel26))
 646                         .addContainerGap(84, Short.MAX_VALUE))))
 647         );
 648 
 649         jTabbedPane1.addTab("Stock-Specific Statistics", jPanel2);
 650 
 651         transactionsTable.setModel(new javax.swing.table.DefaultTableModel(
 652             new Object [][] {
 653                 {null, null, null, null, null, null, null, null, null, null},
 654                 {null, null, null, null, null, null, null, null, null, null},
 655                 {null, null, null, null, null, null, null, null, null, null},
 656                 {null, null, null, null, null, null, null, null, null, null},
 657                 {null, null, null, null, null, null, null, null, null, null},
 658                 {null, null, null, null, null, null, null, null, null, null},
 659                 {null, null, null, null, null, null, null, null, null, null},
 660                 {null, null, null, null, null, null, null, null, null, null},
 661                 {null, null, null, null, null, null, null, null, null, null},
 662                 {null, null, null, null, null, null, null, null, null, null},
 663                 {null, null, null, null, null, null, null, null, null, null},
 664                 {null, null, null, null, null, null, null, null, null, null},
 665                 {null, null, null, null, null, null, null, null, null, null},
 666                 {null, null, null, null, null, null, null, null, null, null},
 667                 {null, null, null, null, null, null, null, null, null, null},
 668                 {null, null, null, null, null, null, null, null, null, null},
 669                 {null, null, null, null, null, null, null, null, null, null},
 670                 {null, null, null, null, null, null, null, null, null, null},
 671                 {null, null, null, null, null, null, null, null, null, null},
 672                 {null, null, null, null, null, null, null, null, null, null},
 673                 {null, null, null, null, null, null, null, null, null, null},
 674                 {null, null, null, null, null, null, null, null, null, null},
 675                 {null, null, null, null, null, null, null, null, null, null},
 676                 {null, null, null, null, null, null, null, null, null, null},
 677                 {null, null, null, null, null, null, null, null, null, null},
 678                 {null, null, null, null, null, null, null, null, null, null},
 679                 {null, null, null, null, null, null, null, null, null, null},
 680                 {null, null, null, null, null, null, null, null, null, null},
 681                 {null, null, null, null, null, null, null, null, null, null},
 682                 {null, null, null, null, null, null, null, null, null, null},
 683                 {null, null, null, null, null, null, null, null, null, null},
 684                 {null, null, null, null, null, null, null, null, null, null},
 685                 {null, null, null, null, null, null, null, null, null, null},
 686                 {null, null, null, null, null, null, null, null, null, null},
 687                 {null, null, null, null, null, null, null, null, null, null},
 688                 {null, null, null, null, null, null, null, null, null, null},
 689                 {null, null, null, null, null, null, null, null, null, null},
 690                 {null, null, null, null, null, null, null, null, null, null},
 691                 {null, null, null, null, null, null, null, null, null, null},
 692                 {null, null, null, null, null, null, null, null, null, null},
 693                 {null, null, null, null, null, null, null, null, null, null},
 694                 {null, null, null, null, null, null, null, null, null, null},
 695                 {null, null, null, null, null, null, null, null, null, null},
 696                 {null, null, null, null, null, null, null, null, null, null},
 697                 {null, null, null, null, null, null, null, null, null, null},
 698                 {null, null, null, null, null, null, null, null, null, null},
 699                 {null, null, null, null, null, null, null, null, null, null},
 700                 {null, null, null, null, null, null, null, null, null, null},
 701                 {null, null, null, null, null, null, null, null, null, null},
 702                 {null, null, null, null, null, null, null, null, null, null},
 703                 {null, null, null, null, null, null, null, null, null, null},
 704                 {null, null, null, null, null, null, null, null, null, null},
 705                 {null, null, null, null, null, null, null, null, null, null},
 706                 {null, null, null, null, null, null, null, null, null, null},
 707                 {null, null, null, null, null, null, null, null, null, null},
 708                 {null, null, null, null, null, null, null, null, null, null},
 709                 {null, null, null, null, null, null, null, null, null, null},
 710                 {null, null, null, null, null, null, null, null, null, null},
 711                 {null, null, null, null, null, null, null, null, null, null},
 712                 {null, null, null, null, null, null, null, null, null, null},
 713                 {null, null, null, null, null, null, null, null, null, null},
 714                 {null, null, null, null, null, null, null, null, null, null},
 715                 {null, null, null, null, null, null, null, null, null, null},
 716                 {null, null, null, null, null, null, null, null, null, null},
 717                 {null, null, null, null, null, null, null, null, null, null},
 718                 {null, null, null, null, null, null, null, null, null, null},
 719                 {null, null, null, null, null, null, null, null, null, null},
 720                 {null, null, null, null, null, null, null, null, null, null},
 721                 {null, null, null, null, null, null, null, null, null, null},
 722                 {null, null, null, null, null, null, null, null, null, null},
 723                 {null, null, null, null, null, null, null, null, null, null},
 724                 {null, null, null, null, null, null, null, null, null, null},
 725                 {null, null, null, null, null, null, null, null, null, null},
 726                 {null, null, null, null, null, null, null, null, null, null},
 727                 {null, null, null, null, null, null, null, null, null, null},
 728                 {null, null, null, null, null, null, null, null, null, null},
 729                 {null, null, null, null, null, null, null, null, null, null},
 730                 {null, null, null, null, null, null, null, null, null, null},
 731                 {null, null, null, null, null, null, null, null, null, null},
 732                 {null, null, null, null, null, null, null, null, null, null},
 733                 {null, null, null, null, null, null, null, null, null, null},
 734                 {null, null, null, null, null, null, null, null, null, null},
 735                 {null, null, null, null, null, null, null, null, null, null},
 736                 {null, null, null, null, null, null, null, null, null, null},
 737                 {null, null, null, null, null, null, null, null, null, null},
 738                 {null, null, null, null, null, null, null, null, null, null},
 739                 {null, null, null, null, null, null, null, null, null, null},
 740                 {null, null, null, null, null, null, null, null, null, null},
 741                 {null, null, null, null, null, null, null, null, null, null},
 742                 {null, null, null, null, null, null, null, null, null, null},
 743                 {null, null, null, null, null, null, null, null, null, null},
 744                 {null, null, null, null, null, null, null, null, null, null},
 745                 {null, null, null, null, null, null, null, null, null, null},
 746                 {null, null, null, null, null, null, null, null, null, null},
 747                 {null, null, null, null, null, null, null, null, null, null},
 748                 {null, null, null, null, null, null, null, null, null, null},
 749                 {null, null, null, null, null, null, null, null, null, null},
 750                 {null, null, null, null, null, null, null, null, null, null},
 751                 {null, null, null, null, null, null, null, null, null, null},
 752                 {null, null, null, null, null, null, null, null, null, null}
 753             },
 754             new String [] {
 755                 "Stock Name", "Date", "Shares", "Dividends", "Price", "Bought/Sell", "Average Price TD", "Shares Owned TD", "Transaction Profit", "Profit TD"
 756             }
 757         ) {
 758             Class[] types = new Class [] {
 759                 java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Double.class, java.lang.Double.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.Double.class
 760             };
 761 
 762             public Class getColumnClass(int columnIndex) {
 763                 return types [columnIndex];
 764             }
 765         });
 766         jScrollPane1.setViewportView(transactionsTable);
 767 
 768         jLabel23.setText("Display Stock: ");
 769 
 770         jLabel24.setText("Sort by:");
 771 
 772         sortByTransactionTableCB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Date", "Price", "Number of Shares", "Transaction Profit", " " }));
 773         sortByTransactionTableCB.addActionListener(new java.awt.event.ActionListener() {
 774             public void actionPerformed(java.awt.event.ActionEvent evt) {
 775                 sortByTransactionTableCBActionPerformed(evt);
 776             }
 777         });
 778 
 779         jLabel25.setText("Order to Sort");
 780 
 781         sortOrderTransactionTableCB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Recent First", "Recent Last", "Smallest to Largest", "Largest to Smallest", " " }));
 782 
 783         displayTransactionTableButton.setText("Display");
 784         displayTransactionTableButton.addMouseListener(new java.awt.event.MouseAdapter() {
 785             public void mouseReleased(java.awt.event.MouseEvent evt) {
 786                 displayTransactionTableButtonMouseReleased(evt);
 787             }
 788         });
 789         displayTransactionTableButton.addActionListener(new java.awt.event.ActionListener() {
 790             public void actionPerformed(java.awt.event.ActionEvent evt) {
 791                 displayTransactionTableButtonActionPerformed(evt);
 792             }
 793         });
 794 
 795         jLabel27.setText("To display all transactions enter 'All'");
 796 
 797         jLabel29.setText("TD = To Date");
 798 
 799         jButton1.setText("Clear Table");
 800         jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
 801             public void mouseReleased(java.awt.event.MouseEvent evt) {
 802                 jButton1MouseReleased(evt);
 803             }
 804         });
 805 
 806         javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
 807         jPanel3.setLayout(jPanel3Layout);
 808         jPanel3Layout.setHorizontalGroup(
 809             jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 810             .addGroup(jPanel3Layout.createSequentialGroup()
 811                 .addContainerGap()
 812                 .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 813                     .addGroup(jPanel3Layout.createSequentialGroup()
 814                         .addComponent(jScrollPane1)
 815                         .addGap(16, 16, 16))
 816                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
 817                         .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 818                             .addGroup(jPanel3Layout.createSequentialGroup()
 819                                 .addComponent(jLabel23)
 820                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
 821                                 .addComponent(stockToDisplayTransactionsTableTF, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE))
 822                             .addComponent(jLabel27))
 823                         .addGap(12, 12, 12)
 824                         .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
 825                             .addGroup(jPanel3Layout.createSequentialGroup()
 826                                 .addComponent(jLabel24)
 827                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 828                                 .addComponent(sortByTransactionTableCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 829                                 .addGap(26, 26, 26)
 830                                 .addComponent(jLabel25)
 831                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 832                                 .addComponent(sortOrderTransactionTableCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 833                             .addGroup(jPanel3Layout.createSequentialGroup()
 834                                 .addComponent(jLabel29)
 835                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 836                                 .addComponent(displayTransactionTableButton)))
 837                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
 838                         .addComponent(jButton1)
 839                         .addGap(81, 81, 81))))
 840         );
 841         jPanel3Layout.setVerticalGroup(
 842             jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 843             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
 844                 .addContainerGap(11, Short.MAX_VALUE)
 845                 .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 846                     .addComponent(jLabel23)
 847                     .addComponent(jLabel24)
 848                     .addComponent(sortByTransactionTableCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 849                     .addComponent(jLabel25)
 850                     .addComponent(sortOrderTransactionTableCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
 851                     .addComponent(stockToDisplayTransactionsTableTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
 852                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
 853                 .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
 854                     .addComponent(jLabel27)
 855                     .addComponent(displayTransactionTableButton)
 856                     .addComponent(jLabel29)
 857                     .addComponent(jButton1))
 858                 .addGap(11, 11, 11)
 859                 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE)
 860                 .addContainerGap())
 861         );
 862 
 863         jTabbedPane1.addTab("Transactions Table", jPanel3);
 864 
 865         fileMenu.setMnemonic('f');
 866         fileMenu.setText("File");
 867 
 868         openMenuItem.setMnemonic('o');
 869         openMenuItem.setText("Open");
 870         fileMenu.add(openMenuItem);
 871 
 872         saveMenuItem.setMnemonic('s');
 873         saveMenuItem.setText("Save");
 874         fileMenu.add(saveMenuItem);
 875 
 876         saveAsMenuItem.setMnemonic('a');
 877         saveAsMenuItem.setText("Save As ...");
 878         saveAsMenuItem.setDisplayedMnemonicIndex(5);
 879         fileMenu.add(saveAsMenuItem);
 880 
 881         exitMenuItem.setMnemonic('x');
 882         exitMenuItem.setText("Exit");
 883         exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
 884             public void actionPerformed(java.awt.event.ActionEvent evt) {
 885                 exitMenuItemActionPerformed(evt);
 886             }
 887         });
 888         fileMenu.add(exitMenuItem);
 889 
 890         menuBar.add(fileMenu);
 891 
 892         editMenu.setMnemonic('e');
 893         editMenu.setText("Edit");
 894 
 895         cutMenuItem.setMnemonic('t');
 896         cutMenuItem.setText("Cut");
 897         editMenu.add(cutMenuItem);
 898 
 899         copyMenuItem.setMnemonic('y');
 900         copyMenuItem.setText("Copy");
 901         editMenu.add(copyMenuItem);
 902 
 903         pasteMenuItem.setMnemonic('p');
 904         pasteMenuItem.setText("Paste");
 905         editMenu.add(pasteMenuItem);
 906 
 907         deleteMenuItem.setMnemonic('d');
 908         deleteMenuItem.setText("Delete");
 909         editMenu.add(deleteMenuItem);
 910 
 911         menuBar.add(editMenu);
 912 
 913         helpMenu.setMnemonic('h');
 914         helpMenu.setText("Help");
 915 
 916         contentsMenuItem.setMnemonic('c');
 917         contentsMenuItem.setText("Contents");
 918         helpMenu.add(contentsMenuItem);
 919 
 920         aboutMenuItem.setMnemonic('a');
 921         aboutMenuItem.setText("About");
 922         helpMenu.add(aboutMenuItem);
 923 
 924         menuBar.add(helpMenu);
 925 
 926         setJMenuBar(menuBar);
 927 
 928         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
 929         getContentPane().setLayout(layout);
 930         layout.setHorizontalGroup(
 931             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 932             .addGroup(layout.createSequentialGroup()
 933                 .addGap(18, 18, 18)
 934                 .addComponent(jTabbedPane1)
 935                 .addContainerGap())
 936         );
 937         layout.setVerticalGroup(
 938             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
 939             .addGroup(layout.createSequentialGroup()
 940                 .addGap(17, 17, 17)
 941                 .addComponent(jTabbedPane1)
 942                 .addContainerGap())
 943         );
 944 
 945         pack();
 946     }// </editor-fold>                        
 947 
 948     private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {                                             
 949         System.exit(0);
 950     }                                            
 951 
 952     private void buyTransactionCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {                                                       
 953         // TODO add your handling code here:
 954     }                                                      
 955 
 956     private void calculateProfitButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                      
 957         // TODO add your handling code here:
 958     }                                                     
 959 
 960     private void enterTheoreticalPriceSoldTFActionPerformed(java.awt.event.ActionEvent evt) {                                                            
 961         // TODO add your handling code here:
 962     }                                                           
 963 
 964     private void displayTransactionTableButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                              
 965         // TODO add your handling code here:
 966     }                                                             
 967 
 968     private void newUsernameTFActionPerformed(java.awt.event.ActionEvent evt) {                                              
 969         // TODO add your handling code here:
 970     }                                             
 971 
 972     private void returningUsernameTFActionPerformed(java.awt.event.ActionEvent evt) {                                                    
 973         // TODO add your handling code here:
 974     }                                                   
 975 
 976     private void returningUserLoginTFMouseReleased(java.awt.event.MouseEvent evt) {                                                   
 977         // TODO add your handling code here:
 978         boolean usernameExists = false;
 979         for (int i = 0; i < users.size(); i++) {
 980             if (returningUsernameTF.getText().equals(users.get(i).getUserName())) {
 981                 usernameExists = true;
 982                 usingUserNumber = i;
 983                 i = users.size();
 984             }
 985         }
 986         if (usernameExists == false) {
 987             returningUsernameTF.setText("Error");
 988             loginErrorTF.setText("Invalid Username, username does not exist.");
 989         }
 990         else if (usernameExists && returningPasswordTF.getText().equals(users.get(usingUserNumber).getPassword()) == false){
 991             returningPasswordTF.setText("Error");
 992             loginErrorTF.setText("Incorrect Password");
 993         }
 994         else if (usernameExists && returningPasswordTF.getText().equals(users.get(usingUserNumber).getPassword())) {
 995             loggedIn = true;
 996             transactions = readingTransactionsFile(users.get(usingUserNumber).getUserName());
 997             stocksNameList = readingStocksNameListFile(users.get(usingUserNumber).getUserName());
 998             returningUsernameTF.setText("Logged In");
 999             returningPasswordTF.setText("Logged In");
1000             loginErrorTF.setText("Logged In");
1001 
1002             //create new String array with new stock name
1003             String[] stocksNameListForCB = new String[stocksNameList.size() + 1];
1004             stocksNameListForCB[0] = "";
1005             for (int i = 0; i < stocksNameList.size(); i++) {
1006                 stocksNameListForCB[i + 1] = stocksNameList.get(i);
1007             }
1008 
1009             //display combo box with new stock added
1010             existingStockNameCB.setModel(new javax.swing.DefaultComboBoxModel<>(stocksNameListForCB));
1011 
1012         } else if (usernameExists && returningPasswordTF.getText() != (users.get(usingUserNumber).getPassword())) {
1013             returningPasswordTF.setText("Error");
1014             loginErrorTF.setText("Incorrect password, please try again.");
1015         }
1016     }                                                  
1017 
1018     private void addNewUserInfoTFMouseReleased(java.awt.event.MouseEvent evt) {                                               
1019         boolean usernameTaken = false;
1020         for (int i = 0; i < users.size(); i++) {
1021             if (newUsernameTF.getText().equals(users.get(i).getUserName())) {
1022                 newUsernameTF.setText("Error");
1023                 loginErrorTF.setText("Invalid username: Username taken, pick another username");
1024                 usernameTaken = true;
1025                 i = users.size();
1026             }
1027         }
1028         if (newUsernameTF.getText().equals("")) {
1029             newUsernameTF.setText("Error");
1030             loginErrorTF.setText("Please enter username");
1031         } else if (newUserPasswordTF.getText().equals(newUserConfirmPasswordTF.getText())
1032                 && usernameTaken == false) {
1033             //add new user
1034             users.add(new User(newUsernameTF.getText(), newUserPasswordTF.getText(), null));
1035 
1036             //Clear textfields, inform user new account established
1037             newUsernameTF.setText("");
1038             newUserPasswordTF.setText("");
1039             newUserConfirmPasswordTF.setText("");
1040             loginErrorTF.setText("Account successfully made, proceed to login");
1041         } //error checking if new password does not match confirm password
1042         else if (!(newUserPasswordTF.getText().equals(newUserConfirmPasswordTF.getText()))
1043                 && usernameTaken == false) {
1044             newUserConfirmPasswordTF.setText("Error");
1045             loginErrorTF.setText("New Password and Confirm Password does not match");
1046         }
1047     }                                              
1048 
1049     private void returningPasswordTFActionPerformed(java.awt.event.ActionEvent evt) {                                                    
1050         // TODO add your handling code here:
1051     }                                                   
1052 
1053     private void enterTransactionButtonMouseReleased(java.awt.event.MouseEvent evt) {                                                     
1054         // TODO add your handling code here:
1055         if (loggedIn) {
1056             String date = String.valueOf(dateDayTransactionCB.getSelectedItem())
1057                     + dateMonthTransactionCB.getSelectedItem()
1058                     + dateYearTransactionCB.getSelectedItem();
1059 
1060             double averagePriceToDate = -999.99;
1061             int totalSharesOwned = -99;
1062             double profit = -99.99;
1063             double netProfit = -99.99;
1064             boolean canSell = true;
1065             //These values are obscure values, for testing purposes, so when these numbers show or obscure values are
1066             // displayed, it is known that code has semantics error
1067 
1068             //If one of the transaction data is not entered
1069             if ((newStockNameTransactionTF.getText().equals("") && existingStockNameCB.getSelectedItem().equals(""))
1070                     || enterNumberOfSharesTF.getText().equals("")
1071                     || enterStockDividendsTF.getText().equals("")
1072                     || enterStockPriceTF.getText().equals("")
1073                     || dateDayTransactionCB.getSelectedItem().equals(" ")
1074                     || dateMonthTransactionCB.getSelectedItem().equals(" ")
1075                     || dateYearTransactionCB.getSelectedItem().equals(" ")) {
1076                 transactionErrorTF.setText("Please enter all transaction information");
1077             } else {
1078                 for (int i = transactions.size() - 1; i > -2; i--) {
1079                     if (i == -1) {
1080                         totalSharesOwned = (Integer.parseInt(enterNumberOfSharesTF.getText() + ""));
1081                         averagePriceToDate = (Double.parseDouble(enterStockPriceTF.getText() + ""));
1082                         profit = 0.00;
1083                         netProfit = 0.00;
1084                     } //
1085                     else if ((transactions.get(i).getStockName()).equals(newStockNameTransactionTF.getText())
1086                             || (transactions.get(i).getStockName()).equals(String.valueOf(existingStockNameCB.getSelectedItem()))) {
1087                         if (buyTransactionCheckBox.isSelected() == true) {
1088                             totalSharesOwned = ((transactions.get(i)).getTotalSharesOwnedToDate())
1089                                     + (Integer.parseInt(enterNumberOfSharesTF.getText() + ""));
1090 
1091                             averagePriceToDate = ((((transactions.get(i)).getAveragePriceToDate())
1092                                     * ((transactions.get(i)).getTotalSharesOwnedToDate()))
1093                                     + ((Integer.parseInt(enterNumberOfSharesTF.getText() + ""))
1094                                     * (Double.parseDouble(enterStockPriceTF.getText() + ""))))
1095                                     / totalSharesOwned;
1096 
1097                             profit = 0;
1098                             netProfit = transactions.get(i).getProfitToDate();
1099 
1100                         } else if (sellTransactionCheckBox.isSelected() == true) {
1101 
1102                             //check if user has enough shares to sell
1103                             totalSharesOwned = ((transactions.get(i)).getTotalSharesOwnedToDate());
1104                             if (totalSharesOwned < (Integer.parseInt(enterNumberOfSharesTF.getText() + ""))) {
1105                                 canSell = false;
1106                             }
1107 
1108                             //calculates values for new transaction to be added
1109                             totalSharesOwned = ((transactions.get(i)).getTotalSharesOwnedToDate())
1110                                     - (Integer.parseInt(enterNumberOfSharesTF.getText() + ""));
1111 
1112                             if (totalSharesOwned == 0) {
1113                                 averagePriceToDate = 0;
1114                             } else {
1115                                 averagePriceToDate = ((((transactions.get(i)).getAveragePriceToDate())
1116                                         * ((transactions.get(i)).getTotalSharesOwnedToDate()))
1117                                         - ((Integer.parseInt(enterNumberOfSharesTF.getText() + ""))
1118                                         * (Double.parseDouble(enterStockPriceTF.getText() + ""))))
1119                                         / totalSharesOwned;
1120                             }
1121 
1122                             double moneySpent = transactions.get(i).getAveragePriceToDate()
1123                                     * (Integer.parseInt(enterNumberOfSharesTF.getText() + ""));
1124                             double moneyReceive = (Integer.parseInt(enterNumberOfSharesTF.getText() + ""))
1125                                     * (Double.parseDouble(enterStockPriceTF.getText() + ""));
1126                             profit = moneyReceive - moneySpent;
1127 
1128                             netProfit = transactions.get(i).getProfitToDate() + profit;
1129 
1130                             //if user tries to sell more stocks than owned
1131                             if ((Integer.parseInt(enterNumberOfSharesTF.getText() + ""))
1132                                     > ((transactions.get(i)).getTotalSharesOwnedToDate())) {
1133                                 transactionErrorTF.setText("Selling more stocks than owned");
1134                             }
1135 
1136                         }
1137                         i = -1;
1138                     } else {
1139                     }
1140                 }
1141 
1142                 //Error Handling of Enter Transaction Tab Starts Here
1143                 if ((buyTransactionCheckBox.isSelected() == true && sellTransactionCheckBox.isSelected() == true)
1144                         || (buyTransactionCheckBox.isSelected() == false && sellTransactionCheckBox.isSelected() == false)) {
1145                     transactionErrorTF.setText("Please select either Buy or Sell");
1146                 } //Error Handling of Enter Transaction Tab Starts Here
1147                 else if (buyTransactionCheckBox.isSelected() == true ^ sellTransactionCheckBox.isSelected() == true) {
1148                     //Error handling of new/existing stock transaction
1149                     if ((existingStockButton.isSelected() == true && newStockButton.isSelected() == true)) {
1150                         transactionErrorTF.setText("Please select if stock is new or existing");
1151                     } else if ((existingStockButton.isSelected() == true && newStockButton.isSelected() == true)
1152                             || (existingStockButton.isSelected() == false && newStockButton.isSelected() == false)) {
1153                         transactionErrorTF.setText("Please check either 'existing stock' or 'new stock' check box");
1154                     } else if (canSell == false) {
1155                         transactionErrorTF.setText("Selling more shares than owned");
1156                     } //existing stock or new stock transaction
1157                     else if (newStockButton.isSelected() == true && existingStockButton.isSelected() == false) {
1158                         transactions.add(new Transaction(
1159                                 newStockNameTransactionTF.getText(),
1160                                 date,
1161                                 Integer.parseInt(enterNumberOfSharesTF.getText() + ""),
1162                                 Double.parseDouble(enterStockDividendsTF.getText() + ""),
1163                                 Double.parseDouble(enterStockPriceTF.getText() + ""),
1164                                 buyTransactionCheckBox.isSelected(),
1165                                 System.currentTimeMillis(),
1166                                 averagePriceToDate,
1167                                 totalSharesOwned,
1168                                 profit,
1169                                 netProfit
1170                         ));
1171                         transactionErrorTF.setText("Transaction entry successful");
1172 
1173                         //add new stock name to combo box
1174                         //error handling for if new stock name already exists in Combo Box
1175                         //and entered in new stock textfield
1176                         boolean stockExists = false;
1177                         for (int i = 0; i < stocksNameList.size(); i++) {
1178                             if (newStockNameTransactionTF.getText().equals(stocksNameList.get(i))) {
1179                                 stockExists = true;
1180                                 i = stocksNameList.size();
1181                             }
1182                         }
1183                         if (stockExists == false) {
1184                             stocksNameList.add(transactions.get(transactions.size() - 1).getStockName());
1185                         }
1186 
1187                         //create new String array with new stock name
1188                         String[] stocksNameListForCB = new String[stocksNameList.size()];
1189                         stocksNameListForCB[0] = "";
1190                         for (int i = 1; i < stocksNameList.size(); i++) {
1191                             stocksNameListForCB[i] = stocksNameList.get(i);
1192                         }
1193 
1194                         //display combo box with new stock added
1195                         existingStockNameCB.setModel(new javax.swing.DefaultComboBoxModel<>(stocksNameListForCB));
1196 
1197                         // Clear all input textfields, check boxes, combo boxes to orginal state.
1198                         newStockNameTransactionTF.setText("");
1199                         dateDayTransactionCB.setSelectedItem(" ");
1200                         dateMonthTransactionCB.setSelectedItem(" ");
1201                         dateYearTransactionCB.setSelectedItem(" ");
1202                         newStockButton.setSelected(false);
1203                         existingStockButton.setSelected(false);
1204                         enterNumberOfSharesTF.setText("");
1205                         enterStockDividendsTF.setText("");
1206                         enterStockPriceTF.setText("");
1207                         buyTransactionCheckBox.setSelected(false);
1208                         sellTransactionCheckBox.setSelected(false);
1209                         existingStockNameCB.setSelectedItem("");
1210 
1211                     } else if (existingStockButton.isSelected() == true && newStockButton.isSelected() == false) {
1212                         transactions.add(new Transaction(
1213                                 String.valueOf(existingStockNameCB.getSelectedItem()),
1214                                 date,
1215                                 Integer.parseInt(enterNumberOfSharesTF.getText() + ""),
1216                                 Double.parseDouble(enterStockDividendsTF.getText() + ""),
1217                                 Double.parseDouble(enterStockPriceTF.getText() + ""),
1218                                 buyTransactionCheckBox.isSelected(),
1219                                 System.currentTimeMillis(),
1220                                 averagePriceToDate,
1221                                 totalSharesOwned,
1222                                 profit,
1223                                 netProfit
1224                         ));
1225                         transactionErrorTF.setText("Transaction entry successful");
1226                         // Clear all input textfields, check boxes, combo boxes to orginal state.
1227                         newStockNameTransactionTF.setText("");
1228                         dateDayTransactionCB.setSelectedItem(" ");
1229                         dateMonthTransactionCB.setSelectedItem(" ");
1230                         dateYearTransactionCB.setSelectedItem(" ");
1231                         newStockButton.setSelected(false);
1232                         existingStockButton.setSelected(false);
1233                         enterNumberOfSharesTF.setText("");
1234                         enterStockDividendsTF.setText("");
1235                         enterStockPriceTF.setText("");
1236                         buyTransactionCheckBox.setSelected(false);
1237                         sellTransactionCheckBox.setSelected(false);
1238                         existingStockNameCB.setSelectedItem("");
1239                     }
1240                 }
1241             }
1242         } else {
1243             //***
1244             transactionErrorTF.setText("Login Required");
1245         }
1246     }                                                    
1247 
1248     private void displaySpecificStockInfoButtonMouseReleased(java.awt.event.MouseEvent evt) {                                                             
1249         // TODO add your handling code here:
1250         if (loggedIn) {
1251             for (int i = transactions.size() - 1; i > -1; i--) {
1252                 if (((transactions.get(i)).getStockName()).equals(stockSpecificStockToDisplayTF.getText())) {
1253                     displayTotalSharesOwnedTF.setText(String.valueOf(transactions.get(i).getTotalSharesOwnedToDate()));
1254                     displayTotalMoneyInvestedTF.setText(String.valueOf(
1255                             Math.round((transactions.get(i).getTotalSharesOwnedToDate())
1256                                     * (transactions.get(i).getAveragePriceToDate()) * 100) / (100)
1257                     ));
1258                     if (transactions.get(i).getTotalSharesOwnedToDate() == 0) {
1259                         displayCurrentAveragePriceTF.setText("n/a");
1260                     } else {
1261                         displayCurrentAveragePriceTF.setText(String.valueOf(
1262                                 Math.round((transactions.get(i).getAveragePriceToDate()) * 100) / 100));
1263                     }
1264                     i = -1; //If the program finds the most recent transaction, the information is displayed, and loop ends
1265                 } else if (i == 0) {
1266                     displayTotalSharesOwnedTF.setText("No data for Stock");
1267                     displayTotalMoneyInvestedTF.setText("No data for Stock");
1268                     displayCurrentAveragePriceTF.setText("No data for Stock");
1269                 } else {
1270                 }
1271             }
1272         } else {
1273             //***
1274             stockSpecificStockToDisplayTF.setText("Login Required");
1275         }
1276     }                                                            
1277 
1278     private void displayTransactionTableButtonMouseReleased(java.awt.event.MouseEvent evt) {                                                            
1279         // TODO add your handling code here:
1280         if (loggedIn) {
1281             SortAndSearchTransactions sst = new SortAndSearchTransactions();
1282 
1283             if (sortByTransactionTableCB.getSelectedItem().equals("Date")
1284                     && (sortOrderTransactionTableCB.getSelectedItem().equals("Recent First"))) {
1285                 sst.selectionSortOfTransactionsTime(transactions);
1286             } else if (sortByTransactionTableCB.getSelectedItem().equals("Date")
1287                     && (sortOrderTransactionTableCB.getSelectedItem().equals("Recent Last"))) {
1288                 sst.selectionSortOFTransactionsMaxToMinTime(transactions);
1289             } else if (sortByTransactionTableCB.getSelectedItem().equals("Price")
1290                     && sortOrderTransactionTableCB.getSelectedItem().equals("Smallest to Largest")) {
1291                 sst.selectionSortOFTransactionsPrice(transactions);
1292             } else if (sortByTransactionTableCB.getSelectedItem().equals("Price")
1293                     && sortOrderTransactionTableCB.getSelectedItem().equals("Largest to Smallest")) {
1294                 sst.selectionSortOFTransactionsMaxToMinPrice(transactions);
1295             } else if (sortByTransactionTableCB.getSelectedItem().equals("Number of Shares")
1296                     && sortOrderTransactionTableCB.getSelectedItem().equals("Smallest to Largest")) {
1297                 sst.selectionSortOFTransactionsNumberOfShares(transactions);
1298             } else if (sortByTransactionTableCB.getSelectedItem().equals("Number of Shares")
1299                     && sortOrderTransactionTableCB.getSelectedItem().equals("Largest to Smallest")) {
1300                 sst.selectionSortOFTransactionsMaxToMinNumberOfShares(transactions);
1301             } else if (sortByTransactionTableCB.getSelectedItem().equals("Transaction Profit")
1302                     && sortOrderTransactionTableCB.getSelectedItem().equals("Smallest to Largest")) {
1303                 sst.selectionSortOFTransactionsTransactionProfit(transactions);
1304             } else if (sortByTransactionTableCB.getSelectedItem().equals("Transaction Profit")
1305                     && sortOrderTransactionTableCB.getSelectedItem().equals("Largest to Smallest")) {
1306                 sst.selectionSortOFTransactionsMaxToMinTransactionProfit(transactions);
1307             }
1308 
1309             int N = transactions.size();
1310             ArrayList<Transaction> transactionsDisplay = new ArrayList<Transaction>();
1311 
1312             if (stockToDisplayTransactionsTableTF.getText().equals("All")) {
1313                 transactionsDisplay = transactions;
1314             } else {
1315                 for (int i = 0; i < N; i++) {
1316                     if ((transactions.get(i).getStockName()).equals(stockToDisplayTransactionsTableTF.getText())) {
1317                         transactionsDisplay.add(transactions.get(i));
1318                     }
1319                 }
1320             }
1321 
1322             if (transactionsDisplay.size() <= transactionsTable.getRowCount()) {
1323 
1324                 for (int row = 0; row < transactionsDisplay.size(); row++) {
1325                     if (transactionsDisplay.get(row).getStockName().equals("preventNull")) {
1326 
1327                     } else {
1328                         transactionsTable.setValueAt(transactionsDisplay.get(row).getStockName(), row, 0);
1329                         transactionsTable.setValueAt(transactionsDisplay.get(row).getDate(), row, 1);
1330                         transactionsTable.setValueAt(transactionsDisplay.get(row).getNumberOfShares(), row, 2);
1331                         transactionsTable.setValueAt(transactionsDisplay.get(row).getDividends(), row, 3);
1332                         transactionsTable.setValueAt(transactionsDisplay.get(row).getPrice(), row, 4);
1333                         if (transactionsDisplay.get(row).getBought() == true) {
1334                             transactionsTable.setValueAt("Bought", row, 5);
1335                         } else {
1336                             transactionsTable.setValueAt("Sold", row, 5);
1337                         }
1338                         if (transactionsDisplay.get(row).getTotalSharesOwnedToDate() == 0) {
1339                             transactionsTable.setValueAt("n/a", row, 6);
1340                         } else {
1341                             transactionsTable.setValueAt(String.valueOf(transactionsDisplay.get(row).getAveragePriceToDate()), row, 6);
1342                         }
1343                         transactionsTable.setValueAt(transactionsDisplay.get(row).getTotalSharesOwnedToDate(), row, 7);
1344                         if (transactionsDisplay.get(row).getBought() == true) {
1345                             transactionsTable.setValueAt("n/a", row, 8);
1346                         } else {
1347                             transactionsTable.setValueAt(String.valueOf((transactionsDisplay.get(row).getTransactionProfit())),
1348                                     row, 8);
1349                         }
1350                         transactionsTable.setValueAt(transactionsDisplay.get(row).getProfitToDate(), row, 9);
1351 //                        double netProfitToDate = ((transactions.get(row).getProfitToDate())
1352 //                                - (Double.parseDouble(transactions.get(row).getTotalSharesOwnedToDate()+"") 
1353 //                                * transactions.get(row).getAveragePriceToDate())); 
1354 //                        transactionsTable.setValueAt(netProfitToDate, row, 10);
1355                     }
1356                 }
1357 
1358             }
1359         } else {
1360             transactionsTable.setValueAt("LogIn Requried", 0, 0);
1361         }
1362     }                                                           
1363 
1364     private void calculateProfitButtonMouseReleased(java.awt.event.MouseEvent evt) {                                                    
1365         // TODO add your handling code here:
1366         if (loggedIn) {
1367             double profit = -999.99;
1368             int N = 0;
1369 
1370             for (int i = transactions.size() - 1; i > -1; i--) {
1371                 if (((transactions.get(i)).getStockName()).equals(enterStockToSellTF.getText())) {
1372                     N = i;
1373                     i = -1;
1374                 } else {
1375                 }
1376             }
1377 
1378             double moneySpent = transactions.get(N).getAveragePriceToDate()
1379                     * Integer.parseInt(enterTheoreticalAmountSoldTF.getText() + "");
1380             double moneyReceive = (Integer.parseInt(enterTheoreticalAmountSoldTF.getText() + ""))
1381                     * (Integer.parseInt(enterTheoreticalPriceSoldTF.getText() + ""));
1382             profit = moneyReceive - moneySpent;
1383             displayTheoreticalProfitTF.setText(String.valueOf(profit));
1384         } else {
1385             displayTheoreticalProfitTF.setText("LogIn Required");
1386         }
1387     }                                                   
1388 
1389     private void stockSpecificStockToDisplayTFActionPerformed(java.awt.event.ActionEvent evt) {                                                              
1390         // TODO add your handling code here:
1391     }                                                             
1392 
1393     private void clearSpecificStockInfoButtonMouseReleased(java.awt.event.MouseEvent evt) {                                                           
1394         // TODO add your handling code here:
1395         stockSpecificStockToDisplayTF.setText("");
1396         displayTotalSharesOwnedTF.setText("");
1397         displayTotalMoneyInvestedTF.setText("");
1398         displayCurrentAveragePriceTF.setText("");
1399         displayTotalDividendsToDateTF.setText("");
1400     }                                                          
1401 
1402     private void sortByTransactionTableCBActionPerformed(java.awt.event.ActionEvent evt) {                                                         
1403         // TODO add your handling code here:
1404     }                                                        
1405 
1406     private void existingStockButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                    
1407         // TODO add your handling code here:
1408     }                                                   
1409 
1410     private void jButton1MouseReleased(java.awt.event.MouseEvent evt) {                                       
1411         // TODO add your handling code here:
1412         for (int row = 0; row < transactionsTable.getRowCount(); row++) {
1413             for (int column = 0; column < transactionsTable.getColumnCount(); column++) {
1414                 transactionsTable.setValueAt(null, row, column);
1415             }
1416         }
1417     }                                      
1418 
1419     private void saveUpdatesButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                  
1420         // TODO add your handling code here:
1421     }                                                 
1422 
1423     private void loginErrorTFActionPerformed(java.awt.event.ActionEvent evt) {                                             
1424         // TODO add your handling code here:
1425     }                                            
1426 
1427     private void deleteAccountButtonMouseReleased(java.awt.event.MouseEvent evt) {                                                  
1428         // TODO add your handling code here:
1429         boolean usernameExists = false;
1430         for (int i = 0; i < users.size(); i++) {
1431             if (returningUsernameTF.getText().equals(users.get(i).getUserName())) {
1432                 usernameExists = true;
1433                 usingUserNumber = i;
1434                 i = users.size();
1435             }
1436         }
1437         if (usernameExists == false) {
1438             returningUsernameTF.setText("Error");
1439             loginErrorTF.setText("Invalid Username, username does not exist.");
1440         } else if (loggedIn == false) {
1441             returningUsernameTF.setText("Error");
1442             loginErrorTF.setText("Please login in before deleting account.");
1443         } else if (returningUsernameTF.equals("") || returningPasswordTF.equals("")) {
1444             returningUsernameTF.setText("Error");
1445             loginErrorTF.setText("Please enter username and password of account to delete");
1446         } else if (usernameExists && returningPasswordTF.getText().equals(users.get(usingUserNumber).getPassword())) {
1447             //Account deleted means no user is logged in, relogin required.
1448             loggedIn = false;
1449             //needs to be done before user is removed, or username will permanently be taken by unempty file
1450             for (int i = transactions.size() - 1; i > 0; i--) {
1451                 transactions.remove(i);
1452             }
1453             savingTransactions(users.get(usingUserNumber).getUserName(), transactions);
1454             for (int i = stocksNameList.size() - 1; i > 0; i--) {
1455                 stocksNameList.remove(i);
1456             }
1457             savingStocksNameList(users.get(usingUserNumber).getUserName(), stocksNameList);
1458             //removing users and moving later users down an index
1459             users.remove(usingUserNumber);
1460             for (int i = usingUserNumber; i < users.size() - 1; i++) {
1461                 users.add(i, users.get(i + 1));
1462                 if(i == users.size()-2){
1463                     users.remove(users.size()-1);
1464                 }
1465             }
1466             savingUsersList(users);
1467             //deleting transactions
1468             for (int i = 0; i < transactions.size(); i++) {
1469                 transactions.remove(transactions.get(i));
1470             }
1471             //deleting stocks Name List
1472             for (int i = 0; i < stocksNameList.size(); i++) {
1473                 stocksNameList.remove(stocksNameList.get(i));
1474             }
1475             returningUsernameTF.setText("Account");
1476             returningPasswordTF.setText("Deleted");
1477         } else if (usernameExists && returningPasswordTF.getText() != (users.get(usingUserNumber).getPassword())) {
1478             returningPasswordTF.setText("Error");
1479             loginErrorTF.setText("Incorrect password, please try again.");
1480         }
1481     }                                                 
1482 
1483     private void saveUpdatesButtonMouseReleased(java.awt.event.MouseEvent evt) {                                                
1484         // TODO add your handling code here:
1485         if (loggedIn) {
1486             savingUsersList(users);
1487             savingTransactions(users.get(usingUserNumber).getUserName(), transactions);
1488             savingStocksNameList(users.get(usingUserNumber).getUserName(), stocksNameList);
1489             loginErrorTF.setText("Save Successful");
1490         } else {
1491             loginErrorTF.setText("Please log into an account");
1492         }
1493     }                                               
1494 
1495     /**
1496      * @param args the command line arguments
1497      */
1498     public static void main(String args[]) {
1499         /* Set the Nimbus look and feel */
1500         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
1501         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
1502          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
1503          */
1504         try {
1505             for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
1506                 if ("Nimbus".equals(info.getName())) {
1507                     javax.swing.UIManager.setLookAndFeel(info.getClassName());
1508                     break;
1509                 }
1510             }
1511         } catch (ClassNotFoundException ex) {
1512             java.util.logging.Logger.getLogger(IAGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1513         } catch (InstantiationException ex) {
1514             java.util.logging.Logger.getLogger(IAGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1515         } catch (IllegalAccessException ex) {
1516             java.util.logging.Logger.getLogger(IAGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1517         } catch (javax.swing.UnsupportedLookAndFeelException ex) {
1518             java.util.logging.Logger.getLogger(IAGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1519         }
1520         //</editor-fold>
1521 
1522         /* Create and display the form */
1523         java.awt.EventQueue.invokeLater(new Runnable() {
1524             public void run() {
1525                 new IAGUI().setVisible(true);
1526             }
1527         });
1528     }
1529 
1530     // Variables declaration - do not modify                     
1531     private javax.swing.JMenuItem aboutMenuItem;
1532     private javax.swing.JButton addNewUserInfoTF;
1533     private javax.swing.JCheckBox buyTransactionCheckBox;
1534     private javax.swing.JButton calculateProfitButton;
1535     private javax.swing.JButton clearSpecificStockInfoButton;
1536     private javax.swing.JMenuItem contentsMenuItem;
1537     private javax.swing.JMenuItem copyMenuItem;
1538     private javax.swing.JMenuItem cutMenuItem;
1539     private javax.swing.JComboBox<String> dateDayTransactionCB;
1540     private javax.swing.JComboBox<String> dateMonthTransactionCB;
1541     private javax.swing.JComboBox<String> dateYearTransactionCB;
1542     private javax.swing.JButton deleteAccountButton;
1543     private javax.swing.JMenuItem deleteMenuItem;
1544     private javax.swing.JTextField displayCurrentAveragePriceTF;
1545     private javax.swing.JButton displaySpecificStockInfoButton;
1546     private javax.swing.JTextField displayTheoreticalProfitTF;
1547     private javax.swing.JTextField displayTotalDividendsToDateTF;
1548     private javax.swing.JTextField displayTotalMoneyInvestedTF;
1549     private javax.swing.JTextField displayTotalSharesOwnedTF;
1550     private javax.swing.JButton displayTransactionTableButton;
1551     private javax.swing.JMenu editMenu;
1552     private javax.swing.JTextField enterNumberOfSharesTF;
1553     private javax.swing.JTextField enterStockDividendsTF;
1554     private javax.swing.JTextField enterStockPriceTF;
1555     private javax.swing.JTextField enterStockToSellTF;
1556     private javax.swing.JTextField enterTheoreticalAmountSoldTF;
1557     private javax.swing.JTextField enterTheoreticalPriceSoldTF;
1558     private javax.swing.JButton enterTransactionButton;
1559     private javax.swing.JCheckBox existingStockButton;
1560     private javax.swing.JComboBox<String> existingStockNameCB;
1561     private javax.swing.JMenuItem exitMenuItem;
1562     private javax.swing.JMenu fileMenu;
1563     private javax.swing.JMenu helpMenu;
1564     private javax.swing.JButton jButton1;
1565     private javax.swing.JLabel jLabel1;
1566     private javax.swing.JLabel jLabel10;
1567     private javax.swing.JLabel jLabel11;
1568     private javax.swing.JLabel jLabel12;
1569     private javax.swing.JLabel jLabel13;
1570     private javax.swing.JLabel jLabel14;
1571     private javax.swing.JLabel jLabel15;
1572     private javax.swing.JLabel jLabel16;
1573     private javax.swing.JLabel jLabel17;
1574     private javax.swing.JLabel jLabel18;
1575     private javax.swing.JLabel jLabel19;
1576     private javax.swing.JLabel jLabel2;
1577     private javax.swing.JLabel jLabel20;
1578     private javax.swing.JLabel jLabel21;
1579     private javax.swing.JLabel jLabel22;
1580     private javax.swing.JLabel jLabel23;
1581     private javax.swing.JLabel jLabel24;
1582     private javax.swing.JLabel jLabel25;
1583     private javax.swing.JLabel jLabel26;
1584     private javax.swing.JLabel jLabel27;
1585     private javax.swing.JLabel jLabel28;
1586     private javax.swing.JLabel jLabel29;
1587     private javax.swing.JLabel jLabel3;
1588     private javax.swing.JLabel jLabel30;
1589     private javax.swing.JLabel jLabel31;
1590     private javax.swing.JLabel jLabel32;
1591     private javax.swing.JLabel jLabel33;
1592     private javax.swing.JLabel jLabel4;
1593     private javax.swing.JLabel jLabel5;
1594     private javax.swing.JLabel jLabel6;
1595     private javax.swing.JLabel jLabel7;
1596     private javax.swing.JLabel jLabel8;
1597     private javax.swing.JLabel jLabel9;
1598     private javax.swing.JPanel jPanel1;
1599     private javax.swing.JPanel jPanel2;
1600     private javax.swing.JPanel jPanel3;
1601     private javax.swing.JPanel jPanel4;
1602     private javax.swing.JScrollPane jScrollPane1;
1603     private javax.swing.JTabbedPane jTabbedPane1;
1604     private javax.swing.JTextField loginErrorTF;
1605     private javax.swing.JMenuBar menuBar;
1606     private javax.swing.JCheckBox newStockButton;
1607     private javax.swing.JTextField newStockNameTransactionTF;
1608     private javax.swing.JTextField newUserConfirmPasswordTF;
1609     private javax.swing.JTextField newUserPasswordTF;
1610     private javax.swing.JTextField newUsernameTF;
1611     private javax.swing.JMenuItem openMenuItem;
1612     private javax.swing.JMenuItem pasteMenuItem;
1613     private javax.swing.JTextField returningPasswordTF;
1614     private javax.swing.JButton returningUserLoginTF;
1615     private javax.swing.JTextField returningUsernameTF;
1616     private javax.swing.JMenuItem saveAsMenuItem;
1617     private javax.swing.JMenuItem saveMenuItem;
1618     private javax.swing.JButton saveUpdatesButton;
1619     private javax.swing.JCheckBox sellTransactionCheckBox;
1620     private javax.swing.JComboBox<String> sortByTransactionTableCB;
1621     private javax.swing.JComboBox<String> sortOrderTransactionTableCB;
1622     private javax.swing.JTextField stockSpecificStockToDisplayTF;
1623     private javax.swing.JTextField stockToDisplayTransactionsTableTF;
1624     private javax.swing.JTextField transactionErrorTF;
1625     private javax.swing.JTable transactionsTable;
1626     // End of variables declaration                   
1627 
1628 }
1629