scope identifierSafetyEditPanel. static S #listName = "JavaX Identifier Safety"; static JTable table; static JPanel identifierSafetyEditPanel() { final JTable table = sexyTableWithoutDrag(); makeTable(table); final JTextField tf = jtextfield(); Runnable save = r { S value = getTextTrim(tf); if (nempty(value)) if (ml_isChange(addToMechHashMap(listName, mapWithSingleValue(selectedTableRowsFirstColumn(table), value)))) makeTable(table); }; onEnter(tf, save); ret centerAndSouthWithMargins(table, jcenteredline( jlabel("Safety comment:"), jminwidth(250, tf), selectedRowCountTableButton(table, jbutton("Save", save)))); } static void #makeTable(JTable table) { final SS map = mechHashMap(listName); O f = func(S id) -> Map { litorderedmap("Identifier" := id, "Safety" := or2(map.get(id), "?")) }; dataToTable_uneditable(table, map(f, keysWithValueContainingSubstring(map, "?"))); } end scope