I insert data from a util.List into a JTable with beansbinding.I have wrapped an ArrayList into a ObservableList and Observable list assinged to uitl.List.I bound data in Netbeans and set up properties in 'Table Content' in Netbeans 'JTable Beanbinding options'. First time when the list is updated, the JTable is also updated and it is ok. But second time when I set another util.List which is cast into Observable list to the list which is bound to the JTable, the list is updated, but JTable is not updated.(but when I set a list,the System.out.pr.. prints correct values of the list,here I changed the util.List to ObservableList and vise versa to find where the problem is,but no result as I expected)(but when I add objects to the list bound to JTable, then JTable was updated.) How can I update the JTable when the list is updated(That means when I set a new list,the table is also updated every time I set a new list).
Here is my code used to set List
public List<Customer> getSuggestionList() {
return suggestionList;
}
public void setSuggestionList(ObservableList suggestionList) {
try {
List oldSuggestionList = this.suggestionList;
this.suggestionList = suggestionList;
propertySupport.firePropertyChange(PROP_SUGGESTIONLIST, oldSuggestionList, suggestionList);
System.out.println("Suggestionlist is setted-----------");
Customer c = (Customer) suggestionList.get(0);
System.out.println("sugesstion list customer--------" + c.getCustFname());
} catch (Exception e) {
e.printStackTrace();
}
}