!7 sS background = #1009931; static JDesktopPane desktop; static JTextField lblInput; static L modules = synchroList(); p-noconsole { autoRestart(5); desktop = jTiledBackgroundDesktopPane(background); autoFixDesktopPane(desktop); cleanExitOnFrameClose(showMaximizedFrame(desktop)); final JInternalFrame f = showCenteredInternalFrame(desktop, "Hello", 700, 150, setFontSize(20, lblInput = jcenteredtextfield("Find me some stuff"))); packInternalFrameVertically(f); centerInternalFrame(f); swing { f.setLocation(f.getX(), 40); } } sbool hasModuleWithFields(Class c, O... params) { ret hasWhere(modules, c, params); } svoid startModule(Module m) { modules.add(m); m.start(); } sclass Module { JComponent visualize() { ret jCenteredMultiLineLabel(sfu(this)); } void start() {} void cleanMeUp() {} } sclass InterestingStringModule extends Module { S theString; } sclass InputToInterestingString extends Module { transient java.util.Timer timer; void start { timer = doEvery(1000, r { S s = getTextTrim(tfInput); if (!hasModuleWithFields(InterestingStringModule, theString := s)) startModule(new InterestingStringModule(s)); }); } void cleanMeUp() { cancelTimer(timer); } }