private void deleteButActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteButActionPerformed
        int delete = JOptionPane.showConfirmDialog(this, "Are you sure you want to delete this Property",
                "Comfirm Deletion", JOptionPane.YES_NO_CANCEL_OPTION);
        if (delete == JOptionPane.YES_OPTION) {
            try {
                searchResults.deleteRow();
                if (!searchResults.last()) {
                    insertDataNext();
                } else if (searchResults.last()) {
                    insertDataPrev();
                } else if (searchResults.isAfterLast()) {
                    search s = new search(this.user, this.date);
                    s.setVisible(true);
                    this.setVisible(false);
                }
            } catch (SQLException ex) {
                JOptionPane.showMessageDialog(this, "There was a problem deleting this record \nPlease try again.", "ERROR", JOptionPane.WARNING_MESSAGE);
                JOptionPane.showMessageDialog(this, ex, "ERROR", JOptionPane.WARNING_MESSAGE);
            }
        } else if (delete == JOptionPane.NO_OPTION) {
            JOptionPane.showMessageDialog(this, "The record has not been deleted", "Attention", JOptionPane.INFORMATION_MESSAGE);
        }


    }//GEN-LAST:event_deleteButActionPerformed