# Bind Dialog Box: Advanced Tab

Use to bind JavaBeans component (beans) properties with each other so that the bound property values are synchronized. For example, you could bind the `value` property of a JSlider component to the a `text` property of a JTextField component.

The property for which you open the Bind dialog box serves as the target of the binding. In the Bind dialog box, you specify the binding source and configure the binding.

Use one of these methods to indicate the the target of the binding:

- Right-click a component in the GUI Builder and choose a property from the Bind submenu.
- Click the ellipsis (...) button for a property in the Binding category of the property sheet of a bean.

The Binding tab contains a combination of the following fields:

Element | Description
--- | ---
Binding Source | A drop-down list that contains a list of visual components and other beans that are available for binding to the property that was selected when you opened the dialog box. For a bean to be available in this list, it needs to be added to the form.
Binding Expression | A combo box where you can select or type a property of the binding source to bind to the target property. This list might also contain other types of expressions which you can use in the binding. Some of the properties offered in this combo box are special synthetic properties that are added by the beans binding library to enable useful bindings that would not be possible with the base set of properties for some components. The expressions in this dialog box use Expression Language syntax. Some bindings do not require a binding expression.
Display Expression | (Only for elements property of JList components.) Similar to the Binding Expression field, this property enables you to determine what is displayed for the user in the JList. This field corresponds to the JListBinding.DetailBinding class.
Import Data to Form | (Only for elements property of JTable, JList, and JComboBox components,) Enables you to select columns from a database table to bind to the form. If there is no entity class in your project that represents the database table to which you are binding, the IDE will create such an entity class. Note: If the table to which you are binding has any foreign keys, those keys will not be taken into account in the generation of the entity classes. In such a case, it is better to use the New Entity Class Wizard to create the entity classes before importing the data to the form.
Available and Selected columns | (Only for elements property of JTable components.) When you use the Import Data to Form button to select a database table, you can use the Available and Selected lists to move items into and out of the JTable. The Selected list shows everything that is displayed in the table. To add items to a list and remove items from a list select an item and click the < and > to move the item. Or, click the << or >> buttons to remove or add all items.

To rearrange the items in the Selected list, select an item and click the Up or Down button. The order in which items appear in the Selected list is the order in which the columns appear in your table.

Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.