static int centerArrangeWindows_spacing = 20; static L centerArrangeWindows(final Window... windows) { swing { int w = centerArrangeWindows_spacing*(l(windows)-1); for (Window win : windows) w += win.getWidth(); int x = (screenWidth()-w)/2; for (Window win : windows) { setFrameLocation(win, x, (screenHeight()-win.getHeight())/2); x += win.getWidth() + centerArrangeWindows_spacing; } } ret asList(windows); }