桌面应用程序中英文资料外文翻译文献

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

桌面应用程序中英文资料外文翻译文献

Binding Beans and Data in a Desktop Application This guide is an introduction to the support in NetBeans IDE 6.0 for beans binding and data binding in Java desktop applications.

Software and Files Needed for the Tutorial

For this tutorial you need to have the following software installed on your computer:

NetBeans IDE 6.0 (download).

Java Standard Development Kit (JDK) version 5.0 or 6.0 (download)

Introduction: Beans Binding in NetBeans IDE 6.0

Until the release of the beans binding library, it was somewhat cumbersome to connect UI components to databases or to keep values of component properties in sync. For example, displaying data from a standard database in a JTable required the manual creation of utility classes to handle the connection between the database and the JTable. And keeping values of different bean properties in sync (such as the value of a JTextField with the rendering of a visual bean) required hand-coding of listeners and event handlers.

The beans binding library simplifies and standardizes all of this. You can merely write a few lines of code to establish which properties of which components need to be kept in sync, and the beans binding library handles the rest. In the NetBeans IDE, beans binding features are integrated in the GUI Builder, so you can quickly get the behavior of your application coded soon after you have established the visual design.

This guide is an overview of the main aspects of beans binding in the IDE. For a

concrete example of many of these features, you can try the Building a Java Desktop Database Application tutorial.

Binding Properties to Other Properties

At its most basic, beans binding is a way to connect bean properties without using event listening and handling code.

To illustrate the concept of beans binding and how the IDE supports it, we will do a simple example where a user can adjust a slider to change a numerical value in a text field.

To set up the example:

In the IDE, choose, File > New Project.

Select the Java category and select the Java Application template. Click Next.

In the Name and Location page of the wizard, perform the following operations: Type NumberSlider as the project name.

Leave the Set As Main Project checkbox selected.

Clear the Create Main Class checkbox.

Click Finish to exit the wizard and set up the project.

In the Projects window, right-click the NumberSlider project node and choose New > JFrame Form.

(If JFrame Form is not available in the New menu, choose Other. Then in the

相关文档
最新文档