static LL showForm_makeComponents(final Var frame, O... _parts) { new LL l; L parts = asList(_parts); Runnable submit = null; for (int i = 0; i < l(parts); i++) { final O o = parts.get(i), next = get(parts, i+1); if (o instanceof Component || o instanceof S || next instanceof Component) { // smartAdd accepts strings l.add(mapLL wrapForSmartAdd(o == null ? new JPanel : o, next)); if (next instanceof JButton && submit == null) submit = r { ((JButton) next).doClick() }; i++; } else if (isRunnable(o)) l.add(mapLL wrapForSmartAdd(null, jbutton(showFormSubmitButtonName(), submit = r { O result = call(o); if (neq(Boolean.FALSE, result)) disposeFrame(frame.get()); }))); else print("showForm: Unknown element type: " + getClassName(o)); } onEnterInAllTextFields(concatLists(l), submit); // massage labels for (L row : l) { JComponent left = first(row); if (left instanceof JLabel) makeBold((JLabel) left).setVerticalAlignment(JLabel.TOP); } ret l; }