user489041
user489041

Reputation: 28312

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 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);


Upvotes: 4

Views: 495

Answers (2)

user353283
user353283

Reputation:

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

Upvotes: 3

Laurent Pireyn
Laurent Pireyn

Reputation: 6875

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

Upvotes: 3

Related Questions