To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
For a dummy project I am trying to implement the following.
I want a selectable table with data. Also I want a few fields and labels of which the value is determined by the selected table row. Also, when the data is altered in any of the fields, the other components need to be updated.
Thus, one java object, with three components displaying it, all updated whenever the object changes.
I could implement this using a lot of listeners back and forth, but I was wondering if there is some easier way to do so.
For a completely automated solution try using BeanItems and building a Form for your fields. This way when the form is commit():ed the table *should* be instructed that an item has changed. (I hope :))
This also works if you manually update your pojos through the BeanItem (e.g. item.getProperty("myField").setValue(newFieldValue)). All Items have the observer pattern (listeners back and forth) implemented and the item containers listen for events from these.