!7 concept Cat { // -egory S a, b; S globalID = aGlobalID(); } static JTable table; p-substance { conceptsAndBot(); table = showConceptsTable(Cat, func(Cat c) { litorderedmap("A" := c.a, "B" := c.b, "Global ID" := c.globalID) }); addToWindow(table, jRightAlignedLine( jbutton("Add...", f newCat))); } // f takes a concept and makes a map for display static JTable showConceptsTable(final Class cClass, final O f) { final JTable table = showTable(); awtOnConceptChanges(table, 1000, r { new L data; for (A c : list(cClass)) addIfNotNull(data, (Map) pcallF(f, c)); dataToTable_uneditable(data, table); }); ret table; } svoid newCat { final new JTextField a; final JTextField b = jTextField("Something else"); Runnable r = r { cnew(Cat, a := getTextTrim(a), b := getTextTrim(b)) }; showFormTitled("New recognition category", "A", a, "B", b, r); }