I have a JTable which is bound to my EventTracker bean, essentially a wrapper around a list which I will use as append/clear only (i.e., a simple log). Problem is, when I add entries to the list and try to fire an event I don't see any changes. I'm using the NetBeans IDE.
The EventTracker bean is added to the view and instantiated as eventTracker1. From there, I right click on the table and choose 'Table Contents...'. Table model is bound to eventTracker1, binding expression is '${eventList}'. The columns are set up properly to operate on the entries in eventList.
// From inside EventTracker.java
public static final String EVENT_LIST_PROPERTY = "eventList";
public List getEventList() {
System.out.println("Handing out eventList with size: " + Integer.toString(eventList.size()));
return eventList;
}
public void setEventList(List incomingList) {
List oldList = eventList;
eventList = new ArrayList(incomingList);
propertySupport.firePropertyChange(EVENT_LIST_PROPERTY, oldList, eventList);
}
The method firePropertyChange seems to fit the specSo when my outside code operates on setEventList, it seems to fire off the event because then getEventList is called and the list size is going up as expected. It's just that the table isn't rendering. What can I do to make this work?