private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed
    int a = 1;
    String gend = "Male";
    try {

        ResultSet rs = DB.myConnection().createStatement().executeQuery("select * from librian where LibrianID='" + jTextField1.getText() + "'");
        while (rs.next()) {
            a = 2;
            jTextField2.setText(rs.getString("LibrianName"));
            jTextField3.setText(rs.getString("LibrianMiddleName"));
            jTextField6.setText(rs.getString("LibrianSurname"));
            jTextField5.setText(rs.getString("HomeAddress"));
            jTextField4.setText(rs.getString("TemperaryAddress"));
            jTextField7.setText(rs.getString("MobileNumper"));
            jTextField9.setText(rs.getString("HomeTelephone"));
            jTextField8.setText(rs.getString("Age"));
            gend = rs.getString("Gender");
            jLabel16.setText(rs.getString("RegisteringLibrian"));
            jLabel14.setText(rs.getString("RegisteredDate"));
        }

        if (a == 1) {
            jRadioButton1.setSelected(false);
            radbtnFemale.setSelected(false);

        } else if (a == 2 && gend.equals("Male")) {
            jRadioButton1.setSelected(true);
            radbtnFemale.setSelected(false);
            a = 1;
        } else if (a == 2 && gend.equals("Female")) {
            radbtnFemale.setSelected(true);
            jRadioButton1.setSelected(false);
        }
    } catch (Exception e) {
        System.out.print("exception Librian details 441");

    }

}//GEN-LAST:event_jTextField1ActionPerformed