javaswingglazedlists

Java glazedlists: how to update a table row


I'm missing something obvious here.

I have a glazedlists EventList<X> where X is my custom class. This list contains a bunch of values. When I update one of the values, how do I make sure the GUI updates its display for that row?


Solution

  • The way to do this appears to be to replace the list element with itself:

     EventList<X> list = /* get reference to a list */
     X x = list.get(3);
     /* update x here */
     list.set(3,x);