开发者

What are Bindings in Java

I hear the term binding thrown around in reference to GUI's. What does this mean? Why are they useful?

EDIT: Take for example the Netbeans GUI editor. It has a whole tab and section开发者_Go百科 dedicated to bindings in the properties window or the following code


org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, lotsList, jComboBox1);



In the context of GUI's, binding often refers to the bi-directional links between a model and UI components. When one of them changes, the other one changes accordingly.

See http://en.wikipedia.org/wiki/UI_data_binding


Laurent has already provided a fair answer to your question, but on a practical level:

The binding mechanism provides a CRUD (create, read, update, delete) operations. So for example if you bind your database table to a page table, you can create a row and save it automatically, you can update that row, read or delete it.

For netbeans related see: http://netbeans.org/kb/docs/java/gui-binding.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜