What is binding in Java

I heard that the term associated with it is associated with a graphical interface. What does it mean? Why are they useful?

EDIT: Take, for example, the Netbeans GUI editor. It has an entire tab and a section devoted 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); 
+4
source share
2 answers

In the context of a GUI, binding often refers to bidirectional relationships between a model and user interface components. When one of them changes, the other changes accordingly.

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

+3
source

Laurent has already given a fair answer to your question, but at a practical level:

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

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

+3
source

Source: https://habr.com/ru/post/1345739/


All Articles