private void SelectJButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SelectJButtonMouseClicked
        //if merchant was not selected then pop warning
        int[] rowsSelected = loyaltyProgramJTable.getSelectedRows();
        if(rowsSelected.length > 0 && rowsSelected.length < 2){
            //store the selected merchant in the selectedMerchant variable
            try{
                selectedLoyaltyProgram = new LoyaltyProgram((int)loyaltyProgramJTable.getValueAt(rowsSelected[0], 0));
            }catch(Exception e){
                System.err.println( e.getClass().getName() + ": " + e.getMessage() );
                System.exit(0);
            }

            //close the frame
            this.setVisible(false);
            this.dispose();
        }
        else if(rowsSelected.length > 1){
            //warn user that they can only select one merchant
            JOptionPane.showMessageDialog(this,
                "You have selected too many row. Please select one row.",
                "Selection Error",  JOptionPane.WARNING_MESSAGE);
        }
        else{
            //warn the user they must select a merchant first
            JOptionPane.showMessageDialog(this,
                "You did not select any row. Please select a row.",
                "Selection Error",  JOptionPane.WARNING_MESSAGE);
        }
    }//GEN-LAST:event_SelectJButtonMouseClicked