How to retrieve radiogroup data from database in JAVA? M Using Java Swing & SQLite -
this question has answer here:
- how compare strings in java? 23 answers
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
Post a Comment