// runnable must implement a "run(S)" method static JFrame swingChoose(L options, fO runnable) { final JFrame[] frame = new JFrame[1]; new L parts; for (final S s : options) parts.add(newButton(s, runnable { frame[0].dispose(); callOpt(runnable, "run", s); })); ret frame[0] = showPackedFrame("Please choose", vgrid(parts)); }