abstract sclass DynCalculatedList extends DynModule { transient JList list; JComponent visualize() { ret list = jlist(calc()); } void unvisualize() { list = null; } void update() { lock lock; if (list != null) fillListWithStrings(list, calc()); } // Note: This is called on every update, so you should cache // results IN the calc function if they are expensive to make abstract L calc(); }