外文翻译6在桌面应用程序中Bean和数据的绑定解读.docVIP

  • 4
  • 0
  • 约2.22万字
  • 约 23页
  • 2017-03-31 发布于湖北
  • 举报

外文翻译6在桌面应用程序中Bean和数据的绑定解读.doc

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 t

文档评论(0)

1亿VIP精品文档

相关文档