简体   繁体   English

是否可以使用Netbeans GUI设计器从数据库表构建UI元素?

[英]Is it possible to build UI elements from a database table using the Netbeans GUI designer?

I'm building an application with a form that I'd like to populate with questions from a database table. 我正在构建一个应用程序,该应用程序要使用数据库表中的问题来填充。

Is it possible to do this in the Netbeans GUI designer so that each question is inserted into the label of a checkbox element? 是否可以在Netbeans GUI设计器中执行此操作,以便将每个问题插入复选框元素的标签中?

My initial idea of how to do this would be to get a result set back from the database and loop it, however I'm new to the Netbeans environment and tying this in with the GUI designer is escaping me.... 我最初的想法是从数据库中获取结果集并进行循环,但是,我是Netbeans环境的新手,因此与GUI设计器紧密结合可以避免我...。

NetBeans learning trail contains one tutorial explaining the Beans Binding and creating Database application through wizard. NetBeans学习资源包含一个教程,该教程解释了Beans绑定和通过向导创建数据库应用程序。

The tutorial is located at http://netbeans.org/kb/docs/java/gui-db.html 该教程位于http://netbeans.org/kb/docs/java/gui-db.html

You can create a template application using this tutorial and then use the concepts and code provided in the wizard generated application in your application to do the binding of the elements with the data from database. 您可以使用本教程创建模板应用程序,然后使用应用程序中向导生成的应用程序中提供的概念和代码将元素与数据库中的数据进行绑定。

with regards 带着敬意
Tushar Joshi, Nagpur 那格浦尔Tushar Joshi

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM