java bean containing the bound properties Person person = new Person(); // Create new BindingManager with specified java bean BindingManager bindingManager = new BindingManager(person); // Bind JTextField to "name" property JTextField nameField = new JTextField(); bindingManager.bindComponent(nameField, "name" ); // Bind JTextField to nested account number property JTextField accountNumberField = new JTextField(); bindingManager.bindComponent(accountNumberField, "account.accountNumber" );
The binding is implemented using JGoodies binding framework, that is based on common patterns such as ValueModel and PresentationModel.