private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
    if (txtMemberID.getText() != "") {

        btnEdit.setEnabled(true);
        try {

            ResultSet rs = DB.myConnection().createStatement().executeQuery("select * from members where MemberID='" + Integer.parseInt(txtMemberID.getText()) + "'");
            while (rs.next()) {
                txtAddress.setText(rs.getString("MemberAddress"));
                txtHome_telephone_Number.setText(rs.getString("MemberHomeTelephone"));
                txtMember_Father_Name.setText(rs.getString("MemberFatherName"));
                txtMember_First_Name.setText(rs.getString("MemberFirstName"));
                txtMember_Middle_Name.setText(rs.getString("MemberMiddleName"));
                txtMember_Mobile_Number.setText(rs.getString("MemberMobileNumber"));
                txtMember_sur_Name1.setText(rs.getString("MemberSurname"));
                txtMother_Name.setText(rs.getString("MemberMotherName"));
                txtSchool_Admission_Number.setText(rs.getString("SchoolAdmissionNumber"));
                lblRegisterLibrianName.setText(LoadLibrianData.LoadLibrianName(rs.getString("LibrianID")));
                lblDate.setText(rs.getDate("RegisteredDate").toString());
            }
        } catch (SQLException e1) {
            JOptionPane.showMessageDialog(this, "Sql Exception @ MemberDetails 433");
        } catch (NumberFormatException e2) {
            JOptionPane.showMessageDialog(this, "Please enter valid Member ID");
            txtMemberID.grabFocus();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Exception @ MemberDetails 440 please contact \ndeveloper team ");
            e.printStackTrace();
        }
    } else {
        JOptionPane.showMessageDialog(this, "Please Enter valid Member ID");
        txtMemberID.grabFocus();
    }


}//GEN-LAST:event_jButton1ActionPerformed