!7 sclass ComponentTree extends DynModule { new DynModuleRef mate; transient JTree tree; void start { ownTimer(doEvery(1000, r updateMe)); } JComponent visualize() { final JComponent c = dm_getVisualization(mate!); if (c == null) null; ret jSection(str(mate), wrap( jDynamicTree(c, func(Component c) -> L { getComponents(c) }))); } void update { if (setField(mate := DynModuleRef(dm_closestModule(this)))) revisualize(); } }