2014-11-04 75 views
0

到目前爲止,我只能在我的數據庫表中看到這個問題。在jtextfield中看起來像這個 問題。 例子:將數據庫中的數據導入到jradiobutton中java

  • 約翰尼的母親有三個children.The第一個孩子叫月,老二叫May.What是第三個孩子的名字?
- radiobutton June 
- radiobutton Johny 
- radiobutton John 
- radiobutton Johnny 

我怎樣才能把值在我的數據庫表jradiobutton。 並將它們與用戶選擇的值進行比較。

回答

0

我不會給你了整個事情只是一個提示:嘗試瞭解

  • 試圖瞭解按鈕組中的Java。他們只是被湊錢

  • 嘗試從SQL查詢

+0

什麼是你所面臨的問題的結果填入按鈕組按鈕? – 2014-11-04 18:48:50

+0

這一切,我現在可以做。它不會顯示單選按鈕。這是代碼public void Rbtn(JRadioButton a)throws SQLException {{{0}}}}}}}}}}}}}這是代碼public void Rbtn(JRadioButton a)throws SQLException } 公衆一個JRadioButton getRadioButton(一個JRadioButton一個)拋出的SQLException) { 如果(a.isSelected()){ 字符串茶= 「從k_question選擇*」; rs = st.executeQuery(cha); } return a; } – 2014-11-04 19:08:39

+0

iam在如何從數據庫獲取值到jradiobutton時遇到問題 – 2014-11-06 12:48:03