!7 static L sentences; p { sentences = toLinesFullTrim(loadSnippet(#1008606)); sentences = notStartingWith("\"", sentences); JPanel panel = customLayoutPanel(func(Container parent) { Dimension size = parent.getSize(); int y = 10; int w = max(100, size.width); JScrollPane sp = enclosingScrollPane(parent); if (sp != null) w = max(w, sp.getWidth()); for (Component c : parent.getComponents()) { int h = c.getPreferredSize().height; c.setBounds(10, y, w-20, h); y += h + 10; } ret componentsBoundingSize(parent, 10); }); for (S s : takeFirst(10, sentences)) panel.add(jtextfield(s)); //showFrame(panel); showFrame(jscroll(panel)); //showFrame(jscroll_centered(panel)); }