0

我正在 Netbeans swing java 应用程序中做一个关于考试套装的项目。我已经完成了所有工作,例如登录页面、注册页面等。但主要问题仍然存在于考试页面。我已经在数据库中插入了所有问题以及带有答案(未显示)的选项。我设计了一个框架,一个问题标签和三个选择单选按钮,一个 OK 按钮来选择选项,NEXT 按钮转到下一个问题。我可以轻松地从只有一行的数据库中获取数据。但是要得到另一个问题,我应该将代码保留在 NEXT 按钮中,但这只能完成一次。我只想在单击 NEXT 按钮时动态更改表中的数据。我无法做到这一点,请帮助我。谢谢你.....

4

1 回答 1

0

Since your program acesses a database, I assume that you are using ResultSet from JDBC. You need to call ResultSet.next() each time the user clicks on the "Next" button. As long as you keep a reference to the ResultSet, you can call this method until you reach the end of the data set.

于 2013-07-03T19:58:13.657 回答