abstract sclass DynTable extends DynModule { transient JTable table; transient L data; JComponent visualize() { table = dataToTable_uneditable(sexyTable(), data = calc()); onDoubleClickOrEnter(table, voidfunc(int row) { Map line = _get(data, row); if (line != null) onDoubleClick(line); }); ret table; } void unvisualize() { table = null; } void onDoubleClick(Map line) {} void update() { if (table != null) dataToTable_uneditable(table, data = calc()); } // should cache results if they are expensive to make abstract L calc(); }