static int centerArrangeWindows_spacing = 20; static L<Window> 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); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1014293 |
| Snippet name: | centerArrangeWindows |
| Eternal ID of this version: | #1014293/5 |
| Text MD5: | 9e7c5d7148be1a3e3e57edead34484d4 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-04-20 00:20:34 |
| Source code size: | 470 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 650 / 684 |
| Version history: | 4 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |