static JComboBox dm_moduleSelectorComboBox_justID(SimpleLiveValue lvModuleID) { final JComboBox cb = jLiveValueComboBox_withSimplifier(emptyStringPlus(dm_listModuleIDsAndNames()), lvModuleID, f firstIntAsString); final Runnable update = r { awt { S selected = squareBracketStuff(selectedItem(cb)); LS l = emptyStringPlus(dm_listModuleIDsAndNames()); // TODO: change items while keeping popup open if (!cb.isPopupVisible() || !moduleSelector_sameList(getComboBoxItems(cb), l)) setComboBoxItems(cb, l); setSelectedIndex(cb, indexOfStringWithSquareBracketStuffEq(l, selected)); } }; final new Var listener; bindToComponent(cb, r { listener.set(vmBus_onModulesListChange(update)); }, r { close(listener!) }); awtEvery(cb, 60.0, update); // to make up for TODO up there ret cb; }