private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        boolean ch=false,ch2=false;
        for (int i = 0; i < cont.getText().length(); i++) {
            if(cont.getText().charAt(i)=='['||cont.getText().charAt(i)==']'||!Character.isDigit(cont.getText().charAt(i))){
                ch=true;
                break;
            }
        }
        
        for (int i = 0; i < addr.getText().length(); i++) {
            if(addr.getText().charAt(i)=='['||addr.getText().charAt(i)==']'){
                ch2=true;
                break;
            }
        }
        if(ch2)
            JOptionPane.showMessageDialog(null, "please provide a correct address");
        else if(ch)
            JOptionPane.showMessageDialog(null, "please provide a correct contact number");
        else
            query.UpdateInfo(cont.getText(), addr.getText(), fn, ln);
    }//GEN-LAST:event_jButton3ActionPerformed