I have model class with an StringArray aaaa:
public class XXX
{
private String info = "Initial";
private boolean gesperrt = false;
private List<String> aaaaa;
I habe a table:
jt_astliste = new JTable();
jt_astliste.setCellSelectionEnabled(true);
jt_astliste.setAutoCreateRowSorter(true);
jsp_astliste.setViewportView(jt_astliste);
I bound the list to a table:
protected BindingGroup initDataBindings() {
BeanProperty<XXX, List<String>> xxxBeanProperty = BeanProperty.create("aaaaa");
JTableBinding<String, XXX, JTable> jTableBinding = SwingBindings.createJTableBinding(UpdateStrategy.READ_WRITE, xxx, xxxBeanProperty, jt_astliste);
//
ObjectProperty<String> stringObjectProperty = ObjectProperty.create();
jTableBinding.addColumnBinding(stringObjectProperty).setColumnName("AAA");
//
jTableBinding.bind();
//
BindingGroup bindingGroup = new BindingGroup();
//
bindingGroup.addBinding(jTableBinding);
return bindingGroup;
}
Now the Problem: The cells are not editable, and I have found now way to persuade the binding.
Could you give me a hint?
Setting a TableCellEditor did not work, setting setCellEditable(true) did not work.
Thanks,
Sandy