Libraryless. Click here for Pure Java version (10741L/60K).
1 | static <A> JPanel hvgrid_distribute(L<A> components, int gap) { |
2 | if (empty(components)) ret jpanel(); |
3 | int cols = iceil(sqrt(l(components))); |
4 | ret hvgrid(listToChunks(cols, components), gap); |
5 | } |
6 | |
7 | static <A> JPanel hvgrid_distribute(L<A> components) { |
8 | ret hvgrid_distribute(components, 0); |
9 | } |
Began life as a copy of #1004433
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026632 |
Snippet name: | hvgrid_distribute (try to arrange components in a square) |
Eternal ID of this version: | #1026632/3 |
Text MD5: | 0db8777e7cba13775da49352260c296a |
Transpilation MD5: | 7704490e545ad6b98c0e3e553815bb7f |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-08-04 13:28:05 |
Source code size: | 302 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 234 / 341 |
Version history: | 2 change(s) |
Referenced in: | [show references] |