How to retrieve radiogroup data from database in JAVA? M Using Java Swing & SQLite -


this question has answer here:

can tell me how retrieve radiogroup data database? values inserting through radiobutton isn't retrieving database. coding follows:

while(rs.next()) {     string db_name = rs.getstring("name");     string db_add = rs.getstring("address");     string db_gender = rs.getstring("gender");      text_name.settext(db_name);     text_address.settext(db_add);     if(db_gender=="male")     {         radiomale.isselected();     }     else if(db_gender=="female")     {         radiofemale.isselected();         // gendergroup.equals(radiofemale);     } } 

note: radiomale & radiofemale variable names of radiobutton.. db_name & db_add working getting issue on gender.. me out please!!

if doing string compare, should using following;

db_gender.equals("male") 

-kaz


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -